# How to group by Sum in a list or table Collection

**URL:** <https://community.glideapps.com/t/how-to-group-by-sum-in-a-list-or-table-collection/69784>\
**Category:** Ask for Help\
**Created:** [January 20, 2024, 3:44pm UTC](https://community.glideapps.com/t/how-to-group-by-sum-in-a-list-or-table-collection/69784 "2024-01-20T15:44:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![b2p](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@b2p](https://community.glideapps.com/u/b2p)\
**Post date:** [January 20, 2024, 3:44pm UTC](https://community.glideapps.com/t/how-to-group-by-sum-in-a-list-or-table-collection/69784/1 "2024-01-20T15:44:52Z")

</div>

Hi,  
I’m stuck with a simple case I guess…  
Here is my table:

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

I would like to display the total quantity for each item or even, avoid to repeat each occurrence of each item. I tried to use the Group by option but not sure it’s the right method.

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

I suppose there is a way to calculate the total quantity in the table but I don’t know how to do that.  
If someone can help me with that…  
Thanks in advance.

---

<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:** [January 20, 2024, 3:48pm UTC](https://community.glideapps.com/t/how-to-group-by-sum-in-a-list-or-table-collection/69784/2 "2024-01-20T15:48:45Z")

</div>

Create a multiple relation linking Name to itself. Then create a Rollup column that uses the relation to sum the Quantity.

To address the duplicates, add a Row ID column. Then create a Single Value column the retrieves the first RowID from the relation. Only show rows where the Row ID column matches the Single Value column.

---

<div class="post-metadata">

**Author:** ![b2p](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@b2p](https://community.glideapps.com/u/b2p)\
**Post date:** [January 20, 2024, 4:33pm UTC](https://community.glideapps.com/t/how-to-group-by-sum-in-a-list-or-table-collection/69784/3 "2024-01-20T16:33:22Z")

</div>

Jeff,  
That’s fine. It works like I want.  
Thanks a lot for your help.

---

<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:** [January 27, 2024, 4:33pm UTC](https://community.glideapps.com/t/how-to-group-by-sum-in-a-list-or-table-collection/69784/4 "2024-01-27T16:33:23Z")

</div>

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