# Removing duplicates

**URL:** <https://community.glideapps.com/t/removing-duplicates/78152>\
**Category:** Ask for Help\
**Created:** [November 23, 2024, 8:11pm UTC](https://community.glideapps.com/t/removing-duplicates/78152 "2024-11-23T20:11:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![CDP\_Beer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/cdp_beer/32/82292_2.png) [@CDP\_Beer](https://community.glideapps.com/u/CDP_Beer)\
**Post date:** [November 23, 2024, 8:11pm UTC](https://community.glideapps.com/t/removing-duplicates/78152/1 "2024-11-23T20:11:55Z")

</div>

I have a data set that looks like the following (on the left), all of the values for each category are the same. I want to display it in glide like the table on the right, but when trying to filter for duplicates I can only remove all duplicates (not just show the first one). Any ideas? Thanks!

 ![Screenshot 2024-11-23 at 3.09.09 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/1/21e87d28b9514f5eb5076c98e2d5594fa6b9ac2d.png)

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 23, 2024, 9:51pm UTC](https://community.glideapps.com/t/removing-duplicates/78152/2 "2024-11-23T21:51:32Z")

</div>

Add a row id column in the base table.

Create a new tab in your google sheet, and at A1, enter:  
`=UNIQUE('Name of your first tab'!A1:B ; false ; false)`  
It will give you only unique rows.

---

<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:** [November 23, 2024, 10:05pm UTC](https://community.glideapps.com/t/removing-duplicates/78152/3 "2024-11-23T22:05:28Z")

</div>

This is a common method using the same table. Then you can just filter the table.

> [@Filter to display DISTINCT (or Unique) rows based on specified columns](https://community.glideapps.com/t/filter-to-display-distinct-or-unique-rows-based-on-specified-columns/70080/3):
>
> I typically use or recommend the following method: Make sure there is a Row ID column. Create a single Relation or Query to link similar rows to themselves based on similar values. Create a Lookup or Single Value column to retrieve the first matching Row ID from the Relation/Query. Finally create an IF column comparing the row’s Row ID to the Lookup/Single Value column and return true if there is a match. Only the first occurrence will be a match.

---

<div class="post-metadata">

**Author:** ![CDP\_Beer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/cdp_beer/32/82292_2.png) [@CDP\_Beer](https://community.glideapps.com/u/CDP_Beer)\
**Post date:** [November 23, 2024, 10:05pm UTC](https://community.glideapps.com/t/removing-duplicates/78152/4 "2024-11-23T22:05:38Z")

</div>

Is there any functionality like that in glide? I just copied over what I am trying to do in google sheets for easier visibility

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 23, 2024, 10:53pm UTC](https://community.glideapps.com/t/removing-duplicates/78152/5 "2024-11-23T22:53:51Z")

</div>

I mean, you could, but you will have to add every key by hand on the first column, then add a relation column and lookups to the other related columns.

You could use schedule workflow to make a copy of each unique element in another table, but that may not be the best workaround…

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 23, 2024, 10:54pm UTC](https://community.glideapps.com/t/removing-duplicates/78152/6 "2024-11-23T22:54:56Z")

</div>

Or use the method above.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 24, 2024, 12:23am UTC](https://community.glideapps.com/t/removing-duplicates/78152/7 "2024-11-24T00:23:51Z")

</div>

I think you should prioritize using the method Jeff suggests, and move everything you can to Glide Tables.

---

<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:** [November 24, 2024, 1:03am UTC](https://community.glideapps.com/t/removing-duplicates/78152/8 "2024-11-24T01:03:43Z")

</div>

> [@MaximeBaker](#):
>
> Create a new tab in your google sheet, and at A1, enter:  
> `=UNIQUE('Name of your first tab'!A1:B ; false ; false)`  
> It will give you only unique rows.

We stopped recommending spreadsheet formulas at least 2 or 3 years ago. They are almost never required, except for a very few rare cases 🙂

---

<div class="post-metadata">

**Author:** ![Atom](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/atom/32/82126_2.png) [@Atom](https://community.glideapps.com/u/Atom)\
**Post date:** [November 24, 2024, 1:44am UTC](https://community.glideapps.com/t/removing-duplicates/78152/9 "2024-11-24T01:44:23Z")

</div>

I think I understand what you’re trying to achieve. I recommend downloading your Google Sheet and importing it into glide as a new Glide table.

You data table will look something like this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/8/f8609d1e94b0b2472fa9f6052c9df113879d602f.png)

And you can create a helper table where each row will automatically be 1 of the categories:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/5/a567dfcaf355511ef51684604023dd0cf9857fed.png)

1. First we lookup all the Row IDs:  

2. Then we get the index of the current row:  

3. Then we lookup all the categories from the data table:  

4. Get Unique Elements from the categories:  

5. Then a single value column to retrieve the category based on the row #:  

6: Finally a relation and lookup:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/f/6f4121b3a75d2bf1c90f293064d40c37f1493640.png)

Make sure you have enough rows in the helper tables for the number of categories.

---

<div class="post-metadata">

**Author:** ![MaximeBaker](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/maximebaker/32/80877_2.png) [@MaximeBaker](https://community.glideapps.com/u/MaximeBaker)\
**Post date:** [November 24, 2024, 2:54am UTC](https://community.glideapps.com/t/removing-duplicates/78152/10 "2024-11-24T02:54:00Z")

</div>

How would it be possible to automate that from Glide table?

---

<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:** [November 24, 2024, 3:15am UTC](https://community.glideapps.com/t/removing-duplicates/78152/11 "2024-11-24T03:15:52Z")

</div>

See the link that Jeff gave. That’s probably the simplest method.
