Power BI report builder / SSRS - highlight an individual datapoint on a bar chart

28 views Asked by At

I've got the following dataset which represents the high low and average percentage scores for respondents in survey categories. The dataset also has a "Bar_Max" column set to 100 for all rows:

dataset

That I want to visualise like this:

enter image description here

I'm using a bar chart to try and do this.

I think that this article is telling me that I can do this with an expression in the colour property - so I tried this:

=Iif(Fields!Bar_Max.Value = Fields!MinPercentage.Value, "Red", "Green")

But that doesn't seem to have any effect.

Anyone know how to do this / know where I'm going wrong?

Cheers

1

There are 1 answers

0
yonabout On

I think I've pretty much sorted this bar a bit of formatting.

Probably not the best way of doing it, but it seems to do the trick.

I decided to treat it as a stacked bar chart, where the min, average and max values = 1, and I basically calculate the value of the 'background' segments of the bar, then stack them together in order.

So I added some calculated columns to my dataset: Fill1 is the first 'background' segment: Min - Bar_Min

Min = 1

Fill2 is the second 'background' segment: Average - (Bar_Min + Min)

Avg= 1

Fill3 is the third 'background' segment: Max - (Average + Avg)

Max = 1

Fill4 is the final 'background' segment: Bar_Max - (Maximum + Max)

Also had to tweak a couple of the above formulae to deal with the Maximum = 100, otherwise the segments add up to 101.

Which gives me this:

enter image description here

Then with that dataset in report builder, I create a stacked bar chart like this:

enter image description here

which is currently returning this:

enter image description here

So a bit of formatting / fine tuning, but largely there.

Cheers.