# Add (sum) column value with condition

**URL:** <https://community.glideapps.com/t/add-sum-column-value-with-condition/41750>\
**Category:** Ask for Help\
**Created:** [May 8, 2022, 11:52am UTC](https://community.glideapps.com/t/add-sum-column-value-with-condition/41750 "2022-05-08T11:52:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chichap](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chichap/32/42361_2.png) [@Chichap](https://community.glideapps.com/u/Chichap)\
**Post date:** [May 8, 2022, 11:52am UTC](https://community.glideapps.com/t/add-sum-column-value-with-condition/41750/1 "2022-05-08T11:52:09Z")

</div>

I need assistance on glide how can I get the sum value of a column base on a condition.  
My product column has products (with similar names) Id like to get the total amount $ base on the product name. On screenshot I need to get the sum of all shampoo product. I dont see any filtering to do it or not either under the rollup.

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

if in another statement,  
select productname where it is equal to this value, then add this column value (im not sure if it makes sense)

Any guidance is appreciated.

---

<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:** [May 8, 2022, 12:10pm UTC](https://community.glideapps.com/t/add-sum-column-value-with-condition/41750/2 "2022-05-08T12:10:15Z")

</div>

- Create a multiple relation column that matches the Product Name to itself.
- Then use a Rollup Column to get a sum of values from that relation.

---

<div class="post-metadata">

**Author:** ![Chichap](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chichap/32/42361_2.png) [@Chichap](https://community.glideapps.com/u/Chichap)\
**Post date:** [May 8, 2022, 12:30pm UTC](https://community.glideapps.com/t/add-sum-column-value-with-condition/41750/3 "2022-05-08T12:30:31Z")

</div>

thanks for the advise and will explore more for the relational column, and will update here  
cheers!

---

<div class="post-metadata">

**Author:** ![Chichap](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/chichap/32/42361_2.png) [@Chichap](https://community.glideapps.com/u/Chichap)\
**Post date:** [May 8, 2022, 1:11pm UTC](https://community.glideapps.com/t/add-sum-column-value-with-condition/41750/4 "2022-05-08T13:11:15Z")

</div>

You are a superstar! It works.  
Thanks so 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:** [May 9, 2022, 1:12pm UTC](https://community.glideapps.com/t/add-sum-column-value-with-condition/41750/5 "2022-05-09T13:12:03Z")

</div>

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