Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Im want to count count the number of customer within an app for the current day....
If I use
=count({<Type={'Served'}, Date={'2021-10-29'}>}TypeTimestamp) I correctly get 7
However, if I use
count({<Type={'Served'}, Date={"$(=Date(Today(), 'YYYY-MM-DD'))"}>}TypeTimestamp) I get 37....
Can anyone advise please?
Many thanks
Dai
Try like:
count({<Type={'Served'}, Date={'$(=Date(Today(), ''YYYY-MM-DD''))'}>}TypeTimestamp)
Note : highlighted in red are all single quotes. That means, use two singles quotes for formatting the date and put the final date in single quotes as well
Hi Thanks for the reply..
This now returns 0 ... any ideas?
My expression is now
=count({<Type={'Served'}, Date={'$(=Date(Today(),''YYYY-MM-DD''))'}>}TypeTimestamp)
Thanks
What if you replace double quotes with square brackets, like below?
=count({<Type={'Served'}, Date={[$(=Date(Today(),'YYYY-MM-DD'))]}>}TypeTimestamp)
hi, that gives me 37 again....
That is what even I was expecting, i.e. - it should return the same value as set analysis with double quotes. Okay, I guess this should work for your case:
count({<Type={'Served'}, Date={$(=chr(39)&Date(Today(),'YYYY-MM-DD')&chr(39))}>}TypeTimestamp)
Note : no quotes outside $ expansion.
Hi, thanks again for your help... This still gives 37.. 😐..
Could it be anything to do with the format of my Date field?
Could you please post a small sample application inlcuding only your Date field to test solutions with?
thanks
Marco