Iif Isnothing Expression Example

Iif Isnothing Expression Example

I'm using SSRS 2008 and am trying to create an expression where if date field A is greater than date field B or date field A is NULL then this filter will select this record. How do I do this?

I tried this expression to select NULL date fields, but it is not working. I set the datatype to "Text" for now--should I set this to boolean instead? If so, then how can I modify this expression?

=iif(isnothing(Fields!A_date.Value),"yes","no")

1 Answer

=IIF((CDATE(Fields!A_date.Value)>CDate(Fields!B_date.Value)) OR ISNothing(Fields!A_date.Value),"Yes","NO")

Try this !!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.