# Challenging functionality: defining items basket from price changes log

**URL:** <https://community.glideapps.com/t/challenging-functionality-defining-items-basket-from-price-changes-log/65864>\
**Category:** Ask for Help\
**Created:** [September 7, 2023, 6:30am UTC](https://community.glideapps.com/t/challenging-functionality-defining-items-basket-from-price-changes-log/65864 "2023-09-07T06:30:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miroslav\_Madaric](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/miroslav_madaric/32/20852_2.png) [@Miroslav\_Madaric](https://community.glideapps.com/u/Miroslav_Madaric)\
**Post date:** [September 7, 2023, 6:30am UTC](https://community.glideapps.com/t/challenging-functionality-defining-items-basket-from-price-changes-log/65864/1 "2023-09-07T06:30:17Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 7, 2023, 8:02am UTC](https://community.glideapps.com/t/challenging-functionality-defining-items-basket-from-price-changes-log/65864/2 "2023-09-07T08:02:16Z")

</div>

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

 ![CleanShot 2023-09-07 at 15.57.27@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/a/9a19c3d6004c24612c1ccfd2d925674e02500e27.png)

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.

---

<div class="post-metadata">

**Author:** ![Miroslav\_Madaric](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/miroslav_madaric/32/20852_2.png) [@Miroslav\_Madaric](https://community.glideapps.com/u/Miroslav_Madaric)\
**Post date:** [September 7, 2023, 9:00am UTC](https://community.glideapps.com/t/challenging-functionality-defining-items-basket-from-price-changes-log/65864/3 "2023-09-07T09:00:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [September 14, 2023, 9:00am UTC](https://community.glideapps.com/t/challenging-functionality-defining-items-basket-from-price-changes-log/65864/4 "2023-09-14T09:00:57Z")

</div>

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