# Sum all columns with matching columns

**URL:** <https://community.glideapps.com/t/sum-all-columns-with-matching-columns/68758>\
**Category:** Ask for Help\
**Created:** [December 16, 2023, 1:49am UTC](https://community.glideapps.com/t/sum-all-columns-with-matching-columns/68758 "2023-12-16T01:49:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hey](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hey/32/67835_2.png) [@hey](https://community.glideapps.com/u/hey)\
**Post date:** [December 16, 2023, 1:49am UTC](https://community.glideapps.com/t/sum-all-columns-with-matching-columns/68758/1 "2023-12-16T01:49:03Z")

</div>

How would I create a column that gets the sum of all columns with the same hbl column?

 ![CleanShot 2023-12-16 at 08.43.34](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/7/f7b2104efd508059f40581171c295d134472a08b.png)

I have a shipment table where I was able to create a relation to show the names of the charges. But I’m unable to figure out from similar threads how to get the sum of the prices for each hbl.

 ![CleanShot 2023-12-16 at 08.46.31](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/135bdaabab66a3184aed14e5dd64810c0ef91fda.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:** [December 16, 2023, 2:00am UTC](https://community.glideapps.com/t/sum-all-columns-with-matching-columns/68758/2 "2023-12-16T02:00:32Z")

</div>

Create a Relation or Query column to link similar data, then create a Rollup column and point it to that relation or query.

---

<div class="post-metadata">

**Author:** ![hey](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hey/32/67835_2.png) [@hey](https://community.glideapps.com/u/hey)\
**Post date:** [December 16, 2023, 5:47am UTC](https://community.glideapps.com/t/sum-all-columns-with-matching-columns/68758/3 "2023-12-16T05:47:06Z")

</div>

This is exactly what I was looking for, thank you!

Can you suggest a way to take this one step deeper by factoring in the currency? For example, I would only want to add related rows where the currency is USD. Then separately, if the currency is EUR, I’d like to add all EUR charges in a separate column.

---

<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 16, 2023, 6:21am UTC](https://community.glideapps.com/t/sum-all-columns-with-matching-columns/68758/4 "2023-12-16T06:21:08Z")

</div>

Use the Currency as a filter in the Query column.
