# How can I show the total Sum of a "Category" for a given month?

**URL:** <https://community.glideapps.com/t/how-can-i-show-the-total-sum-of-a-category-for-a-given-month/73111>\
**Category:** Ask for Help\
**Created:** [May 6, 2024, 11:58am UTC](https://community.glideapps.com/t/how-can-i-show-the-total-sum-of-a-category-for-a-given-month/73111 "2024-05-06T11:58:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raimundo\_Ladron\_de\_G](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/raimundo_ladron_de_g/32/73733_2.png) [@Raimundo\_Ladron\_de\_G](https://community.glideapps.com/u/Raimundo_Ladron_de_G)\
**Post date:** [May 6, 2024, 11:58am UTC](https://community.glideapps.com/t/how-can-i-show-the-total-sum-of-a-category-for-a-given-month/73111/1 "2024-05-06T11:58:29Z")

</div>

I’m building an expense tracking app that shows the user its daily cashflow or balance. The image below shows a Calendar view with each day’s daily balance.

 ![Balance Diario](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/5/d5ccc357b2d1bb243df061dfdad5e6f0271cd98c.jpeg)

Below is the input form to add a “Movement” - a transaction, either an “Expense” or an “Income”.

The last input field “Categoría” allows users to add a “Category” to that “Movement” (eg. “Rent”, “Leisure”, etc).

 ![Captura de pantalla 2024-05-06 a la(s) 7.50.41 a. m.](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/f/7ff09ddb854d1f0929f432e89b6952863a830f78.png)

**My challenge**

→ How can I show the total Sum of a “Category” for a given month?

 ![Captura de pantalla 2024-05-06 a la(s) 7.57.43 a. m.](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/e/8ed47629a4b5c50eaac3fcfe047118d5fcb309b0.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:** [May 6, 2024, 1:14pm UTC](https://community.glideapps.com/t/how-can-i-show-the-total-sum-of-a-category-for-a-given-month/73111/2 "2024-05-06T13:14:06Z")

</div>

If your Query columns are already set up correctly, then all you need is a Rollup column to sum the amounts from each query.

---

<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:** [May 6, 2024, 11:10pm UTC](https://community.glideapps.com/t/how-can-i-show-the-total-sum-of-a-category-for-a-given-month/73111/3 "2024-05-06T23:10:48Z")

</div>

I see you’re using month-by-month queries at the end of your Categories table. Wouldn’t it be an option to have a table like this:

| Category | Month | Year |
| --- | --- | --- |
| Supermercado | April | 2024 |
| Deporte | May | 2024 |

Then do all of your queries under that table, target the Movements table, filter by the category, month, year and signed-in user’s ID/email.

Finally, add a rollup to sum the amount of expense for the signed-in user, by category, by month.

---

<div class="post-metadata">

**Author:** ![Raimundo\_Ladron\_de\_G](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/raimundo_ladron_de_g/32/73733_2.png) [@Raimundo\_Ladron\_de\_G](https://community.glideapps.com/u/Raimundo_Ladron_de_G)\
**Post date:** [May 14, 2024, 3:03pm UTC](https://community.glideapps.com/t/how-can-i-show-the-total-sum-of-a-category-for-a-given-month/73111/4 "2024-05-14T15:03:55Z")

</div>

I think you are into something.

Because I want to see my categories historically.

Specifically, I want to see category distribution by month.

---

<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:** [May 14, 2024, 11:30pm UTC](https://community.glideapps.com/t/how-can-i-show-the-total-sum-of-a-category-for-a-given-month/73111/5 "2024-05-14T23:30:52Z")

</div>

Yeah, then you can try my suggestion to see if it works for your use case. It consumes rows, but you can use it dynamically for different users.
