Question

Hi I Have a requirment that if the the percentage is >100 then I need green else black.

So i have used the expression

= iif((fields!JulyRev.Value/Fields!JulyValue.Value) > 100, "SeaGreen","Black")

But The above is not giving any green font if the value is greater than 100 but i have infinity value which is showing as green.How to solve the issue?

Was it helpful?

Solution

Since its a percentage you would need to compare to 1 or multiply your value by 100.

= iif((fields!JulyRev.Value/Fields!JulyValue.Value) > 1, "SeaGreen","Black")

OR

= iif((fields!JulyRev.Value*100.0/Fields!JulyValue.Value) > 100, "SeaGreen","Black")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top