# Filter rows in sheet based on last date entry

**URL:** <https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233>\
**Category:** Ask for Help\
**Created:** [September 3, 2020, 9:07pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233 "2020-09-03T21:07:02Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marra](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@Marra](https://community.glideapps.com/u/Marra)\
**Post date:** [September 3, 2020, 9:07pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/1 "2020-09-03T21:07:02Z")

</div>

Hey Guys,

Need some help. User will record their availability for an event, this all gets recorded in a sheet, including the current date and time. however some users might change their mind on the same day for the same event, resulting in multiple records form that user for the same event. I need to filter the data, to only show the last event from that user for the specific event and his/her associated availability. I tried SORTN with SORT and some other but does not have the desired result. Below pic marked RED shows the 3 records from the same user which needs to be filtered into only the latest record.

 ![avail](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/e/e44a9d302694b12ddd592d40519300f8fd23207d.png)

---

<div class="post-metadata">

**Author:** ![AyS\_0908](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ays_0908/32/27349_2.png) [@AyS\_0908](https://community.glideapps.com/u/AyS_0908)\
**Post date:** [September 3, 2020, 9:15pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/2 "2020-09-03T21:15:09Z")

</div>

Hi, I have not tested, but maybe could you deal with it directly into Glide:

1. Create a ‘relation’ column to ‘User’ (ie. a relation to self)
2. Roll-up on ‘date’, select “latest”

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 3, 2020, 9:32pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/3 "2020-09-03T21:32:31Z")

</div>

Just to add to @AyS_0908’s response. Also add an IF/THEN column that will compare the date in the rollup to the date in the row. If it matches return ‘true’. Then you can filter on only true values in the if/then column

---

<div class="post-metadata">

**Author:** ![Marra](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@Marra](https://community.glideapps.com/u/Marra)\
**Post date:** [September 4, 2020, 5:46am UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/4 "2020-09-04T05:46:55Z")

</div>

Thank you @AyS_0908 and @Jeff_Hager.  
I tried your recommendation. The Roll-up on ‘date’ returns the ‘latest’ date in the column, however the ‘latest’ date for each user per event is required. The user can report his availability for all the Events on the same day, therefore the requirement to find the latest record per user per event.

 ![avail](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/f/f671c4301ee4d02a33c35a94bca5554d0ac24bd3.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 4, 2020, 11:52am UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/5 "2020-09-04T11:52:09Z")

</div>

Then just create a template of user and event joined together. Create the self relation using the template column. Same procedure, but just using the template column instead of just the user.

---

<div class="post-metadata">

**Author:** ![Marra](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@Marra](https://community.glideapps.com/u/Marra)\
**Post date:** [September 4, 2020, 1:00pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/6 "2020-09-04T13:00:21Z")

</div>

Thank you @Jeff_Hager  
Perhaps I am missing something:  
Template of USER and EVENT results in “[test3@test.com](mailto:test3@test.com) RC Th”  
Relation of Template results in “[test3@test.com](mailto:test3@test.com)”

The Rollup and IF/THEN column have the same result

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 4, 2020, 1:11pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/7 "2020-09-04T13:11:32Z")

</div>

A relation is only gonna show the first column of the row it finds. It’s still returning the entire row, so you can ignore what you see in the relation column. As for the rollup, make sure you are using the relation and not the sheet.

---

<div class="post-metadata">

**Author:** ![Marra](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@Marra](https://community.glideapps.com/u/Marra)\
**Post date:** [September 4, 2020, 1:21pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/8 "2020-09-04T13:21:50Z")

</div>

BOOM!  
Thank you @Jeff_Hager I did not do the Rollup on the relation. Appreciate the help!

---

<div class="post-metadata">

**Author:** ![cee\_fall](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@cee\_fall](https://community.glideapps.com/u/cee_fall)\
**Post date:** [July 27, 2021, 5:19pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/9 "2021-07-27T17:19:52Z")

</div>

Hii! I have had an issue somewhat similar to this one. I followed the steps in this forum, but somehow, the relation sheet is not showing up when i am trying to generate the rollup column. Do you have any pointers as to what might have gone wrong?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 27, 2021, 8:49pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/10 "2021-07-27T20:49:36Z")

</div>

Did you check ‘Multiple’ when creating the relation?

---

<div class="post-metadata">

**Author:** ![cee\_fall](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@cee\_fall](https://community.glideapps.com/u/cee_fall)\
**Post date:** [July 27, 2021, 10:20pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/11 "2021-07-27T22:20:30Z")

</div>

No, I didn’t. Should I?

---

<div class="post-metadata">

**Author:** ![cee\_fall](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@cee\_fall](https://community.glideapps.com/u/cee_fall)\
**Post date:** [July 27, 2021, 10:38pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/12 "2021-07-27T22:38:59Z")

</div>

Actually, I just tried that and it works! Thank you for your help!

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:51pm UTC](https://community.glideapps.com/t/filter-rows-in-sheet-based-on-last-date-entry/15233/13 "2024-01-17T16:51:22Z")

</div>


