IIF Function Not working. Please help.

  • Hi Everyone. I am trying to do a multi condition IIF Statment, but is returning "Doesn't Work.

    Can someone please help. See code below. Thanks

    =IIF(Fields!Material.Value="Copper"

    AND Fields!Measure.Value = "MASSDRY"

    AND Fields!Category.Value = "Actuals",SUM(Fields!Value.Value),"Doesn't Work")

  • ganteng1 (10/14/2014)


    Hi Everyone. I am trying to do a multi condition IIF Statment, but is returning "Doesn't Work.

    Can someone please help. See code below. Thanks

    =IIF(Fields!Material.Value="Copper"

    AND Fields!Measure.Value = "MASSDRY"

    AND Fields!Category.Value = "Actuals",SUM(Fields!Value.Value),"Doesn't Work")

    First, are you also displaying the values for the three fields you're checking? If not, then you don't really know exactly what the Report server is seeing.

    Second, expressions in Reporting Services ARE case sensitive, so "MassDry" is NOT EQUAL to "MASSDRY". If you don't NEED the case sensitivity, then simply convert everything to UPPER case in your expression.

    =IIF(UCASE(Fields!Material.Value)="COPPER"

    AND UCASE(Fields!Measure.Value) = "MASSDRY"

    AND UCASE(Fields!Category.Value) = "ACTUALS", SUM(Fields!Value.Value),"Doesn't Work")

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply