poshak
poshak

Reputation: 115

How to change color of the font based on the thresh hold value

I have a requirement like if the the threshhold value is greater than 6% the text color should appear as red and between 5-6% it should change to yellow. I tried this expression in the text box font color property for the first requirement iif(fields!My_column.value>6, "red","Black") but did not work. I would appreciate any tips for both of my problems. Thanks

Upvotes: 4

Views: 14178

Answers (1)

Ian Preston
Ian Preston

Reputation: 39586

No reason this shouldn't be working.

You can set the Color property for a Text Box and it should be fine.

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

Gives:

enter image description here

How does your underlying data look? Is 6% "6" or is it actually "0.06"?

Upvotes: 9

Related Questions