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

Query Error if Date has no value

$
0
0

Hi,

I have wrote the following query to calculate some value,

=IIF(LEN(CStr(Fields!PostingDate_ShippingTime.Value)) > 0,IIF(Fields!PostingDate_ShippingTime.Value < Fields!Planned_Delivery_Date.Value,IIF(Fields!Outstanding_Quantity.Value = 0,"ON TIME","LATE"),"LATE"),"None")

Where PostingDate_ShippingTime is a Date type field. I am getting result where ever there is a value for PostingDate_ShippingTime but i am getting #Error where PostingDate_ShippingTime is blank? Any idea where i m doing it wrong.

This is my first ever query in SQL, so please bear with me :)


Viewing all articles
Browse latest Browse all 20764


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