Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Advice with an expression please

$
0
0
Hello

I am trying to write an expression in a calculated field that shows if one date value is greater than another:

=(IIF(fields!date1.value>fields!date2.value,"late","on time")

This works fine when there is a value in fields!date2.

However, if fields!date2.value is blank, the expression returns "on time". I don't want it to do this, as date1 may be 1/4/15 - if date2 is blank, that mean's it's overdue and I therefore want the calculated field to say "late".

Therefore I want the expression to say "late" if fields!date1.value is < today's date (basically, if it's blank and fields!date1.value is before today's date, then it means it's overdue).

Please can anyone advise on how to amend the expression to accommodate this?

Thanks

Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>