Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
looking to find how I can use set analysis to only show the last 24 hours of activity
dimension is OrderDateHour
example
01/01/2001 01:00:00
01/01/2001 02:00:00
01/01/2001 03:00:00
I have to this split into separate fields as OrderDate and OrderHour
I have found code that takes away the last 24 hours, but that's not what I am looking to do
any ideas please
Kind Regards
Hi
think we have it team
the answer is
DateTimeField = {"$(='>' & TimeStamp(Min(DateTimeField), 'DD/MM/YYYY hh:mm:ss') & '<=' & TimeStamp(Max(DateTimeField), 'DD/MM/YYYY hh:mm:ss'))"}
thanks team your awesome , bit of each Sunny and Pradosh code got it working
Kind Regards
May be create a flag in the script for last 24 hours? But last 24 hours from what? the max date and time or now()? But this now can vary
HI
It would be from the max date and hour
so at moment max date and hour is 19/09/2017 13:00
so from 13:00 going backwards each hour for the last 24 hours only (this would be sorted then on the chart)
Please help
May be like this
{<DateTimeField = {"$(='>=' & TimeStamp(Max(DateTimeField) - 1, 'DD/MM/YYYY hh:mm') & '<=' & TimeStamp(Max(DateTimeField), 'DD/MM/YYYY hh:mm'))"}>}
Hi
this seems to work, thanks Sunny , but on the latest hour so e.g. 13:00 today it seems to double the figure ...
its adding todays 19/09/2017 13:00 with yesterdays 18 /09/2017 13:00 figure
please help
Not sure I understand what you mean?
hi
the max hour today's 13:00:00 is being added to yesterday's 13:00 hour's figure
please help
so if max is 13, then you want to get this range, right
>=18/09/2017 13:00<=19/09/2017 13:00?
Hi
yes sort off
the calculation you made is sort of working, but its adding todays and yesterdays 13:00 time values (only the max hour is added double)
{<DateTimeField = {"$(='>=' & TimeStamp(Max(DateTimeField) - 1, 'DD/MM/YYYY hh:mm') & '<=' & TimeStamp(Max(DateTimeField), 'DD/MM/YYYY hh:mm'))"}>}
If I take away the -1 from the code
{<DateTimeField = {"$(='>=' & TimeStamp(Max(DateTimeField), 'DD/MM/YYYY hh:mm') & '<=' & TimeStamp(Max(DateTimeField), 'DD/MM/YYYY hh:mm'))"}>}
I get the correct number for todays 13:00 hour figure but all 0 for the other hours
Please help
yes sort off
What is sort off mean... if you don't need this
>=18/09/2017 13:00<=19/09/2017 13:00
then what exactly do you need?