# How do I remove duplicate row in leaderboard

**URL:** <https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813>\
**Category:** Ask for Help\
**Created:** [February 12, 2023, 1:28am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813 "2023-02-12T01:28:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 1:28am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/1 "2023-02-12T01:28:05Z")

</div>

Hi All,

I have my data I require in the database however it will return a row for each person that are in the same team.

I want to just show 1 row per team.

You can see 2 rows for Team green - need that as 1 row. (1 distinct row per team)…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/5/25f2ae0f1c739430715dd7667c95de46dbeb4bcd.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:** [February 12, 2023, 1:33am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/2 "2023-02-12T01:33:20Z")

</div>

This will work for you.

> [@Filter out duplicate items](https://community.glideapps.com/t/filter-out-duplicate-items/48988/2):
>
> Ultimately I would probably set things up differently. But to stick with your current setup, what you can do is create a template column that joins Business and Category together. Using that template, create a single relation back to itself. Then create a Lookup column that returns the Row ID from the relation. Finally create an IF column that checks if the Row ID matches the Lookup Row ID. If it’s a match, then return true, else false. Or you could probably just have the IF column return the Category name. This will give you a boolean value of true (or Category name) only in the rows that have that Business/Category combination the first time it appears in the data.

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 1:35am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/3 "2023-02-12T01:35:58Z")

</div>

Additional info from DB: can see the 2 x green team score.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/7/f7f84f25d22eea72ac83ed05a8f157ffca95c889.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:** [February 12, 2023, 1:52am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/5 "2023-02-12T01:52:25Z")

</div>

It’s a type of column.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/0/005a916a81ed4f2aa0baa25b7572302fc3a2379a.png)

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 1:52am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/6 "2023-02-12T01:52:49Z")

</div>

I have created the single relation column below, hoping it is correct (See image). However I do not understand next step “Then create a Lookup column that returns the Row ID from the relation”, What relation is this set against? (The single one?) What is the Row ID?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/8/e8913815d732f300568745e89023a6acd8277f05.jpeg)

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 1:57am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/7 "2023-02-12T01:57:22Z")

</div>

Okay - so table did not have unique key column. So I have added it and see if that helps me.

---

<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:** [February 12, 2023, 2:04am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/8 "2023-02-12T02:04:05Z")

</div>

> [@rsykes999](#):
>
> What relation is this set against?

The relation is similar to to your RelationTeamscore, except that it’s only a single relation.

> [@rsykes999](#):
>
> What is the Row ID?

You add it as a new column, just like I’m showing in the screenshot.

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 2:14am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/9 "2023-02-12T02:14:09Z")

</div>

I tried this however does not look correct… as all greyed ticks?

Basically not able to differentiate TRUE -vs- FAILED so I have not done something correctly. Is my IF statement correct?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/d/cd3447fe704b679e549a47b53a7a42cb932aac29.jpeg)

---

<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:** [February 12, 2023, 2:18am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/10 "2023-02-12T02:18:56Z")

</div>

Your lookup is an array, so that tells me that your lookup is looking at the entire table, or your single relation is not a single relation.

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 2:21am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/11 "2023-02-12T02:21:45Z")

</div>

My lookup is looking up ROW ID - so that is the entire table.  
The Single relation is created but not referenced to be used anywhere in your comments.  
Also the ROW ID I created are new values that do not relate in any way shape or form to the URLTeam and ChallengeName (fields that were combined together as template column).

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

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 2:25am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/12 "2023-02-12T02:25:42Z")

</div>

My single relation looks like (though is not part of the IF column statement)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/e/5eca19daced56152d222d239fa23619ac802f52e.jpeg)

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [February 12, 2023, 2:27am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/13 "2023-02-12T02:27:17Z")

</div>

In your lookup column, look up RowID through the single relation you created, don’t look up the entire RowID column of the table.

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 2:30am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/14 "2023-02-12T02:30:41Z")

</div>

I think this is getting closer. See my Lookup pointing at single relation  
however getting Falses now in the If column:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/4/f4888fa787c343f9c3c13dc656c0b298cd71482a.jpeg)

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 2:32am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/15 "2023-02-12T02:32:11Z")

</div>

Single relation being:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/7/e741d1d07360542ce2c2bed581d6102feecc7416.jpeg)

and IF column being:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/b/2bee4701fb668e86e6ce77e220465163a97f64ac.png)

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [February 12, 2023, 2:33am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/16 "2023-02-12T02:33:32Z")

</div>

In the configuration of the lookup column, when you click on the dropdown menu, do you see SingleRelation at the root level towards the top of the list?

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 2:37am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/17 "2023-02-12T02:37:06Z")

</div>

Yes. What should I select?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/f/af607cb1380c7f3e5ceb8720ab9b2e088d4ab42b.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:** [February 12, 2023, 2:38am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/18 "2023-02-12T02:38:30Z")

</div>

> [@rsykes999](#):
>
> The Single relation is created but not referenced to be used anywhere in your comments.

Right here.

> [@Filter out duplicate items](https://community.glideapps.com/t/filter-out-duplicate-items/48988/2):
>
> Then create a Lookup column that returns the Row ID from the **relation**.

Select the single relation and then RowID.

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 2:40am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/19 "2023-02-12T02:40:54Z")

</div>

Done this Jeff. Then what is next step to get the If statement working?

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

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 2:41am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/20 "2023-02-12T02:41:53Z")

</div>

Actual think I may have it working now. (if statement looks good)

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

---

<div class="post-metadata">

**Author:** ![rsykes999](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@rsykes999](https://community.glideapps.com/u/rsykes999)\
**Post date:** [February 12, 2023, 2:42am UTC](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813/21 "2023-02-12T02:42:49Z")

</div>

Works. Thanks so much to all the help. Support here is really solid. It is my brain trying to -understand- the logic is sticking point. Can only learn.

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

[Next page](https://community.glideapps.com/t/how-do-i-remove-duplicate-row-in-leaderboard/57813.md?page=2)
