We have clients, and dates with timestamps… Need to get Max of Date.
Best answer by sunnygudVZView original
You would need a window function for that. There are some hacky ways to achieve it, though not always working but here’s a similar topic:
And a link to product request that definitely needs more votes: https://portal.feedback.us.pendo.io/app/#/case/24417
It’s not a solution. There isn’t one out of the box but the concept you’re after is the same. Have a look here: https://community.looker.com/blog-archives-1027/a-window-into-the-soul-of-your-data-29363
What we were trying to do was on a Looker UI and specifically using Table Calculations, we didnt want to create a Derived table and additional explore for a reason.
After several digging i was able to find a solution that resolved my issue.
Core Problem : Finding a Max Date in a given partitioned window, the problem is the date time format and finding an max value in it.
You can Enhance this based on your need.
The whole purpose of converting the date time in to UnixTimestamp is to allow “offset_list()” to work.
Else, offset_list() cannot identify date as an INT and would fail the implementation.
P.S : The above solution 👆🏻 is only helpful if you prefer to do a Table Calc as opposed to that of a Derived Table Partition.
If you are using a Derived Table please follow the solution provided by
Ah yes, the hacky table calculations - I’m glad you found it and got it to work!