March 23, 2010 at 10:25 am
I'm trying to make the text display in different colors for one data column in my report. If the column value is greater than 85 it should display in black, if it is between 75 and 85 then in Yellow and if it is less that 75 it should display in Red. I'm pretty new to SSRS and have been messing around with trying to figure this out most of the morning. The last thing I was trying was a nested IIF statement, but I don't think i"m nesting the syntax correctly. Here is what I tried!
=IIF(Fields!OEE.Value > 85, "Black", (IIF(Fields!OEE.Value > 75, "Yellow", "Red"))
This just gives me a syntax error.
March 23, 2010 at 11:03 am
You seem to be missing a closing parenthesis or rather have an extra opening paren prior to your nested IIF.
Try this.
=IIF(Fields!OEE.Value > 85, "Black", IIF(Fields!OEE.Value > 75, "Yellow", "Red"))
Also, if you're looking for yellow to be between 75 and 85 you really should use this to get 75 and 85 inclusive in the yellow range.
=IIF(Fields!OEE.Value > 85, "Black", IIF(Fields!OEE.Value > 74, "Yellow", "Red"))
Let me know if this works for you.
-Luke.
March 23, 2010 at 12:08 pm
Worked perfect...got to love it when your just missing a paren
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply