Search code examples
reporting-servicesssrs-2008ssrs-2008-r2ssrs-2012

If A Not Equal to B in SSRS


I understand IIF very well but I am trying to write an expression like the below in SSRS.

    IF A<>B,"D"
    =IIF(A <> B,"C","D") -- this doesn't work for me 

What replaces the sign, "<>" in the expression?


Solution

  • The <> may not work if your values contain NULL so you may have to run a multiple case comparison such as:

    IiF(A<>B OR A IsNothing OR B IsNothing, "C", "D")