Jan 15, 2021
Get latest value for a column based on another column (date)
I want to produce a pivot table which shows a list of all clients and whether or not they have the latest version installed. The attached image shows both my raw data and the desired pivot table output.
I have some problems:
1) Firstly, it doesn't look like google sheet pivot tables support derived attributes; the calculated field concept appears to only apply to metric values. If I am right, I believe that I have to add a column to the raw data.
2) I can't modify the raw data (it is written by an application). I could create an additional tab and use the IMPORTRANGE function to create a clone of the data. Two sub-questions though: i) is the clone live or would I need to manually refresh it? ii) is there an elegant way of creating an additional column that automatically "drags down" as the cloned data gets longer?
3) I'm stuck with the right formula I need to "get latest version per component based on datetime". In SQL, this would be achieved with a window function. I guess it's a combination of INDEX, MATCH, SORT AND LOOKUP but I can't wrap my head around it even though I am trying to do something very simple.
Any help greatly appreciated.
Thanks

Details
Community content may not be verified or up-to-date. Learn more.
All Replies (13)