Challenging functionality: defining items basket from price changes log

I have following table example
Item, Price, Timestamp
item1, 33, 9/1/2023
item3, 66, 9/1/2023
item2, 12, 9/3/2023
item1, 32, 9/4/2023
item1, 34, 9/5/2023
item2, 14, 9/5/2023

I want to get “items basket” where the most recent prices for each item are contained, in this example the following ones:
Item, Price, Timestamp

item3, 66, 9/1/2023
item1, 34, 9/5/2023
item2, 14, 9/5/2023

I am using Google Sheets. Could someone give an idea how to solve this challenge in elegant way (not manually, of course!)?

Tnx in advance!

Here is one way:

  • Start by creating a multiple relation column that matches the Item with itself.
  • Add a Rollup column that takes the latest date via the multiple relation
  • Add a Query column that targets the multiple relation column and filters where Timestamp is This Row → Latest Timestamp
  • Finally add a Single Value column that takes the first price from the Query column

I feel like there should be a simpler option with just a single query column and a single value column, but I wasn’t able to get that to work just now. If I can get it to work, I’ll update my reply.

1 Like

Complicated, but it works! Substantially better than vice versa “Simple but doesn’t work!”. :slight_smile:
Tnx Darren, you are the king!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.