Multiple condition expression

  • 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.

  • 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.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • 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