How to change font color based on threshold hold value

I have a requirement, for example, if the threshold value exceeds 6%, the text color should look red and between 5-6% it should change to yellow. I tried this expression in the font color property of the text field for the first iif requirement (fields! My_column.value> 6, "red", "black"), but did not work. I would appreciate any advice on both issues. thanks

+4
source share
1 answer

There is no reason why this should not work.

You can set the Color property for the Text box , and everything should be fine.

=Switch(Fields!My_column.Value > 6, "Red" , Fields!My_column.Value < 5, "Black" , true , "Yellow") 

gives:

enter image description here

What does your baseline data look like? Is it 6% "6" or is it really "0.06"?

+8
source

All Articles