• sharonsql2013 (11/1/2013)


    The reason I have another IIf in the denominator is because we have Previous year again in denominator and this denominator can be zero too. If I do not use this IIF again , I get " #Error as output wherever the denominator is zero.

    Seems strange as the expression in bold below will stop the second part of the iif from running. I have reproduced the code in a report without the second iif without issue.

    =IIF(Fields!PreviousYear.value = 0, 0,

    (Fields!Currentyear.value - Fields!PreviousYear.value)

    /IIF(Fields!PreviousYear.value = 0,1,Fields!PreviousYear.value))

    Whether you continue with the double iif or single iif the cases in the previous post will still work.

    Fitz