Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to get the max time stamp of first 3 days .I am using aggr(max(Datetime),Date) but I want to restrict to first 3 days
Data | Expected output |
7/13/2016 9:45:26 PM | 7/13/2016 9:45:26 PM |
7/13/2016 8:45:26 PM | 7/12/2016 9:48:38 PM |
7/12/2016 9:48:38 PM | 7/11/2016 9:45:26 PM |
7/12/2016 9:45:26 PM | |
7/11/2016 9:45:26 PM | |
7/11/2016 8:45:26 PM | |
7/8/2016 9:45:26 PM | |
7/8/2016 8:45:26 PM | |
7/7/2016 9:45:26 PM | |
7/7/2016 8:45:26 PM | |
7/7/2016 11:45:26 AM | |
7/7/2016 10:45:26 AM | |
7/6/2016 9:45:26 PM | |
7/6/2016 8:45:26 PM |
Hi Krishna,
Is this any good?
Date | Max TS |
---|---|
13/07/2016 | 9:45:26 pm |
12/07/2016 | 9:48:38 pm |
11/07/2016 | 9:45:26 pm |
It's a straight table with a hidden first expression which I'll unhide:
=Date(Floor(Timestamp#(TS))) | =Rank(Max(Date(Floor(Timestamp#(TS))))) | Max(Time(Timestamp#(TS))) |
---|---|---|
13/07/2016 | 1 | 9:45:26 pm |
12/07/2016 | 2 | 9:48:38 pm |
11/07/2016 | 3 | 9:45:26 pm |
In the dimensions limit tab set it to show the smallest three values for the most recent dates. If you set it to show the largest three you will get data on the three oldest dates. You can hide this column by selecting the option in the Presentation tab.
Cheers
Andrew
This expression gives the desire result
=if(Max(TOTAL DATE ,3) <=DATE,
aggr(
max
(
Datetime
)
,DATE)
)
Is this for a calculated dimension? May be this:
Aggr(If(Max(TOTAL <Date> Datetime, 3) >= Datetime, Datetime), Date, Datetime)
That didn't work.it displays more than 3 and not the max of each day
Yes, it's fine.
What is your question? Do you want to do this in script?
Hi Krishna,
Is this any good?
Date | Max TS |
---|---|
13/07/2016 | 9:45:26 pm |
12/07/2016 | 9:48:38 pm |
11/07/2016 | 9:45:26 pm |
It's a straight table with a hidden first expression which I'll unhide:
=Date(Floor(Timestamp#(TS))) | =Rank(Max(Date(Floor(Timestamp#(TS))))) | Max(Time(Timestamp#(TS))) |
---|---|---|
13/07/2016 | 1 | 9:45:26 pm |
12/07/2016 | 2 | 9:48:38 pm |
11/07/2016 | 3 | 9:45:26 pm |
In the dimensions limit tab set it to show the smallest three values for the most recent dates. If you set it to show the largest three you will get data on the three oldest dates. You can hide this column by selecting the option in the Presentation tab.
Cheers
Andrew