# Sum a column

**URL:** https://community.glideapps.com/t/sum-a-column/17028
**Category:** Ask for Help
**Created:** [October 12, 2020, 2:23am UTC](https://community.glideapps.com/t/sum-a-column/17028 "2020-10-12T02:23:36Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Todd\_Lichtenwalter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_lichtenwalter/32/12231_2.png) [@Todd\_Lichtenwalter](https://community.glideapps.com/u/Todd_Lichtenwalter)
#### Post date: [October 12, 2020, 2:23am UTC](https://community.glideapps.com/t/sum-a-column/17028/1 "2020-10-12T02:23:36Z")

</div>

I want to sum a column(users specific). I have a store where students buy meal prep items. When they consume “meals” they obtain some energy points that will be represented in a progress/energy bar. Thought it would be a simple. matter. When I attempt a rollup there is only the count option. What would be the best approach?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [October 12, 2020, 2:37am UTC](https://community.glideapps.com/t/sum-a-column/17028/2 "2020-10-12T02:37:16Z")

</div>

Make sure the column you’re rollup is a number column. If it’s not a number column already (maybe you’re using an If Then Else) then you can have a math column and point to that ITE column, then rollup using the math column.

---

<div class="post-metadata">

### Author: ![Todd\_Lichtenwalter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_lichtenwalter/32/12231_2.png) [@Todd\_Lichtenwalter](https://community.glideapps.com/u/Todd_Lichtenwalter)
#### Post date: [October 12, 2020, 2:43am UTC](https://community.glideapps.com/t/sum-a-column/17028/3 "2020-10-12T02:43:47Z")

</div>

Details: I have a list of purchased items. A template column checks: “is used” is true and “is a meal” is true. The result is true true. There is a number column with the “meal energy value”. I have ITE column that then displays the “meal energy value” when the template is true true. So for now, my data is stuck in a ITE column. To do the lookup sum back in the user profile table I need the ITE result in a number column. How to do that? I made a math column as you suggested however back in the user profile table the lookup only gives the count option (no sum option is shown.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [October 12, 2020, 4:52am UTC](https://community.glideapps.com/t/sum-a-column/17028/4 "2020-10-12T04:52:55Z")

</div>

You can try Valuex1 and point the Value text to your ITE col.

---

<div class="post-metadata">

### Author: ![Todd\_Lichtenwalter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_lichtenwalter/32/12231_2.png) [@Todd\_Lichtenwalter](https://community.glideapps.com/u/Todd_Lichtenwalter)
#### Post date: [October 12, 2020, 12:59pm UTC](https://community.glideapps.com/t/sum-a-column/17028/5 "2020-10-12T12:59:40Z")

</div>

Thank Thin! I found what I was doing wrong. I had made the relationship using something other than the users email. Once I did that the rollup allowed for sum

---

<div class="post-metadata">

### Author: ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)
#### Post date: [October 12, 2020, 5:02pm UTC](https://community.glideapps.com/t/sum-a-column/17028/6 "2020-10-12T17:02:27Z")

</div>

> [@Todd\_Lichtenwalter](#):
>
> When I attempt a rollup there is only the count option. What would be the best approach?

If you wanna “filter” a sum in a column by Rollup, you have to do a Relation by a unique value it’ll have in each row, eg. in your case could be the email or another value you have to recognize who it is.

Finally, with this Relation, you can use a Rollup to sum only the values related by that value you made the Relation

---

<div class="post-metadata">

### Author: ![Todd\_Lichtenwalter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_lichtenwalter/32/12231_2.png) [@Todd\_Lichtenwalter](https://community.glideapps.com/u/Todd_Lichtenwalter)
#### Post date: [October 12, 2020, 6:09pm UTC](https://community.glideapps.com/t/sum-a-column/17028/7 "2020-10-12T18:09:28Z")

</div>

10-4. That was my mistake, not using a unique value for the relation. Thanks!

---

<div class="post-metadata">

### Author: ![Todd\_Lichtenwalter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_lichtenwalter/32/12231_2.png) [@Todd\_Lichtenwalter](https://community.glideapps.com/u/Todd_Lichtenwalter)
#### Post date: [October 13, 2020, 4:01pm UTC](https://community.glideapps.com/t/sum-a-column/17028/8 "2020-10-13T16:01:06Z")

</div>

Thank you Lucas, very nice.

---

<div class="post-metadata">

### Author: ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)
#### Post date: [October 13, 2020, 4:04pm UTC](https://community.glideapps.com/t/sum-a-column/17028/9 "2020-10-13T16:04:35Z")

</div>

You’re welcome @Todd_Lichtenwalter!

---

<div class="post-metadata">

### Author: ![Todd\_Lichtenwalter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/todd_lichtenwalter/32/12231_2.png) [@Todd\_Lichtenwalter](https://community.glideapps.com/u/Todd_Lichtenwalter)
#### Post date: [October 14, 2020, 12:05am UTC](https://community.glideapps.com/t/sum-a-column/17028/10 "2020-10-14T00:05:15Z")

</div>

That solved it. Thank you, not only did I not have the relation setup correctly, it required your move of doing a value X 1. 😀

---

<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: [January 23, 2024, 3:18pm UTC](https://community.glideapps.com/t/sum-a-column/17028/11 "2024-01-23T15:18:31Z")

</div>


