Happy Thursday Community!
I have the below syntax and I am having issues getting my desired result:
IF [VPP Dates]<DateTimeToday() and IsNull([Decl Dates]) THEN "Late" ELSE
IF [VPP Dates]<DateTimeAdd(DateTimeToday(),-14,"days") and IsNull([Decl Dates]) THEN ">14 Days Late" ELSE
"Not Late" ENDIF ENDIF
VPP date is Delivery date
Decl Date is Delivered date
The idea is that if a products delivery date is in the past and the delivered date is blank (meaning not yet delivered), then should be late.
If the delivery date is more that 14 days in the past and the delivered date is blank (meaning not yet delivered, very bad), then should be >14 days late.
For everything else, should be not late.
I am getting the Late and Not late, but I cant seem to pull in any >14 days late.
Please Help!
Thanks in advance
Solved! Go to Solution.
Hi @ZoeM
Change this order
IF [VPP Dates]<DateTimeToday() and IsNull([Decl Dates]) THEN "Late" ELSE
IF [VPP Dates]<DateTimeAdd(DateTimeToday(),-14,"days") and IsNull([Decl Dates]) THEN ">14 Days Late" ELSE
to:
IF [VPP Dates]<DateTimeAdd(DateTimeToday(),-14,"days") and IsNull([Decl Dates]) THEN ">14 Days Late" ELSE
IF [VPP Dates]<DateTimeToday() and IsNull([Decl Dates]) THEN "Late" ELSE
It should work.
Thing is first IF is evaluated and is always going to overwrite the second IF situation, because if first IF is true, then the second one is also true (due to your logic).
Cheers,
Spectacular!
O those orders, if only hah!
Thanks for your help Ben!