Creating additional series from same table column for Line graphs in SSRS

I spent quite a lot of time experimenting to be able to do this.

Say you have a table like so

KPI        Value    Date

Temp      34        …

Press      12         …

 

And you would like to have 2 lines in the line graph, one for temperature, one for pressure, the series for pressure may use the secondary y axis. The series for pressure may use a totally different chart type(column).

To do this, don’t add KPI as a series group, add Date as a category group and add Value twice as values.

for the first Value, use IIf(Fields!KPI.Value = “Temp”, sum(Fields!Value.Value, Nothing).

for the second Value, use IIf(Fields!KPI.Value = “Temp”, sum(Fields!Value.Value, Nothing).

Configure the second value to use secondary y axis and you’re done.

Leave a Reply

Your email address will not be published. Required fields are marked *