CASE WHEN {expectedreceiptdate} < {today} THEN ...
# suiteanalytics
m
CASE WHEN {expectedreceiptdate} < {today} THEN 1 else 0 END My above expression is true even when the expected receipt date and today's date are the same. I only want to show data when today's is greater than the expected receipt date
a
Try putting the formula {today} - {expectedreciptdate} as a result column in your saved search. You will probably get a long decimal number instead of an integer. That's why it's causing that Sometimes I have to use the criteria {today} - {expectedreciptdate} is not between -1 and 0 or something like that to catch the decimals
m
Good point. In the results column I has this which actually then shows the correct days: TRUNC({today} - {expectedreceiptdate})
Just trying to figure out how to use this in the criteria as it complains, tried this:
message has been deleted
k
you're missing a parens
or rather it's in the wrong spot
case when trunc({expectedreceiptdate})<{today} then 1 else 0 end
or - do a expected receipt date - 1
m
ah yes, that was it! parens in the wrong spot!