Trouble with IIF statement to replace blanks in matrix

  • Hi

    I'm trying to replace the blanks in my matrix with zeros (ie at those intersections where no data is returned, insert a zero)

    I've written this statement in the data area of the matrix:

    =iif(Fields!TotalCalls.Value <> "", Sum(Fields!TotalCalls.Value), 0)

    The result is zeros replacing the blanks (yay) but all the good data is replaced with #Error.

    I've tested the Sum(Fields!TotalCalls.Value) statement and it works fine on it's own. What obvious mistake am I making?

    Many thanks

  • You're comparing an integer with a string by accident, so it fails. I think you want to do:

    =IIf(Fields!TotalCalls.Value Is Nothing, 0, Sum(Fields!TotalCalls.Value))

  • Hi drowlfs

    Many thanks - that indeed did work. Your help is most appreciated.

    Paul

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

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