# Duplicated Rows in Aggregated Ingredient List

**URL:** <https://community.glideapps.com/t/duplicated-rows-in-aggregated-ingredient-list/78653>\
**Category:** Ask for Help\
**Created:** [December 17, 2024, 9:19am UTC](https://community.glideapps.com/t/duplicated-rows-in-aggregated-ingredient-list/78653 "2024-12-17T09:19:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emanuele\_Caprodossi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/emanuele_caprodossi/32/83163_2.png) [@Emanuele\_Caprodossi](https://community.glideapps.com/u/Emanuele_Caprodossi)\
**Post date:** [December 17, 2024, 9:19am UTC](https://community.glideapps.com/t/duplicated-rows-in-aggregated-ingredient-list/78653/1 "2024-12-17T09:19:40Z")

</div>

Hi everyone,  
I’m building a shopping list app in Glide (free version) where ingredients are linked to recipes. Here’s the setup:

- I have a table of recipes and a table of ingredients.
- Each ingredient has a quantity tied to a specific recipe.
- Users can select recipes, and the app calculates the **total quantities** of each ingredient based on the selected recipes and their desired portions.

The Issue:  
In my ingredient list, the same ingredient appears multiple times, even though the “aggregated quantity” (using a Rollup column) is correct. For example:

- Recipe 1: Oil = 40g
- Recipe 2: Oil = 1g

Instead of showing **one row** with “Oil: 41g”, I see:

- Oil: 41g
- Oil: 41g

I need a way to display each ingredient only once with the correct total quantity.

What I’ve Tried:

1. I created a **Relation** and a **Rollup** column to sum the quantities.
2. I tried using **Group By** in the list view, but I still see duplicate rows.
3. I can’t use a **Slice** (not available in my plan), and I don’t have Google Sheets as a data source.

Question:  
How can I display each ingredient **only once** with the correct aggregated total quantity in Glide?

Thank you in advance for any suggestions! 😊

---

<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:** [December 17, 2024, 9:34am UTC](https://community.glideapps.com/t/duplicated-rows-in-aggregated-ingredient-list/78653/2 "2024-12-17T09:34:06Z")

</div>

- Add a RowID column to your Ingredients table
- Create a multiple relation column that matches each ingredient with itself
- Use a Single Value column to fetch the first RowID value from the relation
- Create an if-then-else column:  
– If RowID is Single Value RowID, then `true`
- Use the if-then-else column as a filter (only show rows where it is checked)

---

<div class="post-metadata">

**Author:** ![Emanuele\_Caprodossi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/emanuele_caprodossi/32/83163_2.png) [@Emanuele\_Caprodossi](https://community.glideapps.com/u/Emanuele_Caprodossi)\
**Post date:** [December 18, 2024, 2:20pm UTC](https://community.glideapps.com/t/duplicated-rows-in-aggregated-ingredient-list/78653/3 "2024-12-18T14:20:29Z")

</div>

thank you very much

---

<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:** [December 25, 2024, 2:21pm UTC](https://community.glideapps.com/t/duplicated-rows-in-aggregated-ingredient-list/78653/4 "2024-12-25T14:21:11Z")

</div>

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