SSRS IIF Statement not working

Hello,

I’m not sure why but my IIF Statement doesn’t seem to want to work.

=IIF(IsNothing(Fields!Calculated_Address.Value),Fields!Calculated_Dummy.Value, Fields!Calculated_Address.Value)

There is data available.

Hi Aaron,

Looking at your image there is data in Calculated_Address but nothing in dummy.
I might have misunderstood but your if statement is checking if calc_address is nothing (which it isn’t), then show Dummy otherwise show calc address? Does this just need switching around?
Thanks

Mark

I swapped them around resulting in.

=IIF(IsNothing(Fields!Calculated_Dummy.Value),Fields!Calculated_Address.Value, Fields!Calculated_Dummy.Value)

But didn’t resolve anything. :frowning:

=IIF(IsNothing(Fields!Calculated_Address.Value) OR Trim(Fields!Calculated_Address.Value)="",Fields!Calculated_Dummy.Value, Fields!Calculated_Address.Value)

Resolved the issue.

Hi Aaron.
Have you checked that the field is “nothing”. It might be “”
Mark

you could just use String.IsNullOrEmpty function rather than checking for the 2 things.