0

I use MS SSRS 2016 Enterprise.

I have measured values over time that I want to show on one bar chart. Values consists of time and status that was measured in that time, e.g.:

time  | status
05:01 | G (green)
05:15 | R (red)
06:08 | G
11:41 | Y (yellow)
11:43 | R
11:59 | Y
13:00 | G

All I need is to show one colored bar for day from 00:00 to 23:59 that will be colored according to actual status. Time on X axis and in the case above from 05:01 to 05:15 green, 05:15 to 06:08 red, 06:08 to 11:41 also green, than two minutes yellow, then red etc.

Is there some SSRS object, that is able to do this? Calculation of status for each time is not very optimal, so I would like to show periods instead but I can't find an appropriate chart type.

Any help? Thanks in advance!

EDIT: These are real data being load to dataset.

time                status
2016-10-30 10:56:00 0
2016-10-30 10:26:00 3
2016-10-30 07:56:00 0
2016-10-30 06:56:00 3
2016-10-25 17:50:00 0
2016-10-22 08:09:00 0
2016-10-22 07:09:00 3
2016-10-21 13:36:00 0
2016-10-21 08:57:00 0
2016-10-20 15:21:00 0
2016-10-20 15:07:00 0
2016-10-18 19:13:00 0
2016-10-18 15:43:00 3
2016-10-18 03:13:00 0
2016-10-18 02:43:00 3
2016-10-17 14:04:00 0
2016-10-17 14:03:00 0
2016-10-17 12:53:00 0
2016-10-07 17:46:00 0
2016-10-07 17:26:00 0
2016-10-07 17:20:00 0
2016-09-17 19:05:00 0
2016-09-17 18:35:00 3
2016-09-14 09:33:00 0

In this case, there should be long green horizontal bar (because of status 0) with few red spaces (because of status 3) between 2016-09-17 18:35 - 19:05, then 2016-10-18 02:43 - 3:13, 2016-10-18 15:43 - 19:13, 2016-10-22 07:09 - 8:09, 2016-10-30 06:56 - 7:56 and finally from 2016-10-30 10:26 to the end of graph.

user3867873
  • 47
  • 3
  • 12
  • What is the measure in the `Y-axis`? Do you want to count the status through time? – alejandro zuleta Nov 08 '16 at 13:50
  • There is no Y-axis, I just want one colored line with colors according to status. – user3867873 Nov 08 '16 at 14:46
  • Sounds like you want a stacked bar chart. – SS_DBA Nov 08 '16 at 15:03
  • Does you dataset contain status column or do you need to calculate it? What is the logic for calculating the color per column? – alejandro zuleta Nov 08 '16 at 15:11
  • Either no, or I don't know, how to use it. I don't want to have color grouped into one region. In example above, I don't want a chart like GGGYYRR. I need GRGYRYG, according to time. – user3867873 Nov 08 '16 at 15:15
  • One record in table is one event. If event is OK, than I want to have green color from this event to next event. If that event is NOK, than there starts the red color, etc. – user3867873 Nov 08 '16 at 15:17
  • Being said that, your dataset has a column to determine if the event is ok or not, right? Could you share a sample of your dataset with us. – alejandro zuleta Nov 08 '16 at 15:26
  • I edited my question with data from dataset, there isw nothing more. It's simple task. However, I'm not good with SSRS and I cannot find appropriate object to show this kind of data. Is it still difficult to understand? – user3867873 Nov 09 '16 at 07:28

1 Answers1

0

Finally, I found out what I wanted. I'm posting it here to answer my question for future readers. I found this blog:

http://pnarayanaswamy.blogspot.sk/2010/09/range-bar-chart-gantt-chart-using-ssrs.html

The object that is best for this task is Range Bar Chart. First I needed to precalculate "status", "from time" and "to time". Then put time on X axis and status as serie, where range top and bottom value were from and to times. It made kind of gant chart that rearranged to what I needed by setting DrawSideBySide option. Colors were made by setting expression for serie filling.

user3867873
  • 47
  • 3
  • 12