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?

有帮助吗?

解决方案

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")
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top