# Creating a SumIf

**URL:** <https://community.glideapps.com/t/creating-a-sumif/69107>\
**Category:** Ask for Help\
**Created:** [December 30, 2023, 3:20am UTC](https://community.glideapps.com/t/creating-a-sumif/69107 "2023-12-30T03:20:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Strickland](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/benjamin_strickland/32/68255_2.png) [@Benjamin\_Strickland](https://community.glideapps.com/u/Benjamin_Strickland)\
**Post date:** [December 30, 2023, 3:20am UTC](https://community.glideapps.com/t/creating-a-sumif/69107/1 "2023-12-30T03:20:56Z")

</div>

I have one column where I have converted the date to the month where January=1, July=7, December=12, etc.

I would like to take amounts in another field, e.g. “credits” and sum those amounts by the month.

How is this done? Or what formula?

Thanks

---

<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 30, 2023, 3:24am UTC](https://community.glideapps.com/t/creating-a-sumif/69107/2 "2023-12-30T03:24:42Z")

</div>

Create a Query column that uses a filter like “month equals this row-\>month”, then create a rollup column that targets the query column and does a sum.

---

<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 30, 2023, 4:15am UTC](https://community.glideapps.com/t/creating-a-sumif/69107/3 "2023-12-30T04:15:16Z")

</div>

> [@Generating a total](https://community.glideapps.com/t/generating-a-total/69100/2):
>
> You can use a Rollup column to create totals. If you want to Rollup filtered data, then you can also apply a Rollup column to an existing relation or query instead of an entire table. When trying to Rollup a value for a specific month, it’s best to use a math column to convert any dates into an easy numeric value. This in a math column will give you the year and month joined together. Year(Date)\*10^2 +Month(Date) Then you can use that number to create relations.

---

<div class="post-metadata">

**Author:** ![Benjamin\_Strickland](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/benjamin_strickland/32/68255_2.png) [@Benjamin\_Strickland](https://community.glideapps.com/u/Benjamin_Strickland)\
**Post date:** [December 30, 2023, 12:20pm UTC](https://community.glideapps.com/t/creating-a-sumif/69107/4 "2023-12-30T12:20:43Z")

</div>

This is what I have done:

Created a query where column D is greater than 0  
and Month equals 7 (for July)

This produces a text column saying “Deposit #4322”

The amount for July is in this column but I cannot sum it.

---

<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 30, 2023, 12:31pm UTC](https://community.glideapps.com/t/creating-a-sumif/69107/5 "2023-12-30T12:31:58Z")

</div>

A Query column (and relation column) does not return a value. It just creates a link to rows. I’m not sure what you mean when you say that it returns a text column, since the query itself doesn’t return a value. All you should need is a Rollup column that looks through the Query to sum the values in the queried table. What does the column look like that you are trying to sum?

---

<div class="post-metadata">

**Author:** ![Benjamin\_Strickland](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/benjamin_strickland/32/68255_2.png) [@Benjamin\_Strickland](https://community.glideapps.com/u/Benjamin_Strickland)\
**Post date:** [December 30, 2023, 1:05pm UTC](https://community.glideapps.com/t/creating-a-sumif/69107/6 "2023-12-30T13:05:56Z")

</div>

Thanks for your help. I was able to resolve my problem by creating an “If then else” column for the month number and then for each month I did a “RollUp” for that “If then” column. Now I am producing a screen of that. Thanks again.

---

<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 6, 2024, 1:06pm UTC](https://community.glideapps.com/t/creating-a-sumif/69107/7 "2024-01-06T13:06:12Z")

</div>

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