Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
my set analysis for counting the number of orders in two days seems to work:
count([EndterminEck.autoCalendar.Date]={"$(=Date(Today()+2))"}>}Orders)
But I need a if-statement here and I put that in:
if(Count([EndterminEck.autoCalendar.Date])='$(=Date(Today()+2))', Orders)
why I get no returns now?
Syntax seems to be right.
Thanks in advance.
Hello Applicable,
Although syntax seems ok, there seems something wrong with your expression.
Try if-block in count function:
count(if([EndterminEck.autoCalendar.Date]='$(=Date(Today()+2))',Orders))
In terms of performance, this expression will be slower than set expression alternative.
As far as I understand, this solves your problem:
count(if([EndterminEck.autoCalendar.Date]='$(=Date(Today()+2))' or isnull([EndterminEck.autoCalendar.Date]),Orders))
Better performance solution will be:
1) For null values of [EndterminEck.autoCalendar.Date], you can replace them with some text like '#N/A' in your script.
2) Filter null values in set expression like this:
count({<[EndterminEck.autoCalendar.Date]={"$(=Date(Today()+2))"}+{"#N/A"}>} Orders)
Hello Applicable,
Although syntax seems ok, there seems something wrong with your expression.
Try if-block in count function:
count(if([EndterminEck.autoCalendar.Date]='$(=Date(Today()+2))',Orders))
In terms of performance, this expression will be slower than set expression alternative.
Thank you very much, after exchange count and if it seems to count.
I want to add one more attribute, and that is to count also all the orders where there is still no timestamp made.
Since these are still open orders not dispatch yet.
so where to put that attribute inside what you told me:
count(if([EndterminEck.autoCalendar.Date]='$(=Date(Today()+2))',Orders))
As far as I understand, this solves your problem:
count(if([EndterminEck.autoCalendar.Date]='$(=Date(Today()+2))' or isnull([EndterminEck.autoCalendar.Date]),Orders))
Better performance solution will be:
1) For null values of [EndterminEck.autoCalendar.Date], you can replace them with some text like '#N/A' in your script.
2) Filter null values in set expression like this:
count({<[EndterminEck.autoCalendar.Date]={"$(=Date(Today()+2))"}+{"#N/A"}>} Orders)