Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have date format like this '18/04/2019 12:50:08'.
I want show only past 15mts data in my bar chart.
How can we achieve that in sex expression.
My expression now is that. SUM(I'd)
Please help me with that issue.
Thanks
Venkey.
By Creating a variable like this,
vTimeLimit=Timestamp(Now()- Time('00:15:00', 'hh:mm:ss'),'DD/MM/YYYY hh:mm:ss')
Using this in set analysis,
=Count({<Format={">$(=Num(vTimelimit))"}>}ID)
will give you desired result.
Sample Data set used:
Data: LOAD *, Num(Timestamp#(Time,'DD/MM/YYYY hh:mm:ss')) as Format INLINE [ ID, Time 1, 22/04/2019 10:50:08 2, 22/04/2019 12:50:08 3, 22/04/2019 12:59:08 ];
PFA App for Ref.
The solution of @HirisH_V7 will work, but you did not define your definition of the past 15 minutes. By using the now() function you can get three different outputs depending on which mode you are using (0, 1 or 2).
15 min since last reload:
SUM({<Time={">$(=now(0)- interval#('15', 'mm'))"}>})
This will give you the same output as @HirisH_V7 solution.
15 min since the user calls this measure:
SUM({<Time={">$(=now(1)- interval#('15', 'mm'))"}>})
15 min since the user opened the application:
SUM({<Time={">$(=now(2)- interval#('15', 'mm'))"}>})