# Best way to show monthly summary of the expenses in the Expense Tracker app/

**URL:** <https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385>\
**Category:** Ask for Help\
**Created:** [May 15, 2024, 3:28am UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385 "2024-05-15T03:28:47Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aman\_Lalwani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aman_lalwani/32/75129_2.png) [@Aman\_Lalwani](https://community.glideapps.com/u/Aman_Lalwani)\
**Post date:** [May 15, 2024, 3:28am UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/1 "2024-05-15T03:28:47Z")

</div>

Hello everyone,

I have recently started playing around with Glide and really appreciate this support forum. I have built a simple app to log in our monthly expenses. It currently has only 5 columns - Description, Category, Expense Type(Fix/Variable), Date and Amount Spent. Everything works fine so far, but I would like to add the following features:

- A Component showing the total sum of all expenses for the current month.

Before I start building this I would like to ask for your opinions of the best approach to this. Thank you!

---

<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 15, 2024, 3:36am UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/2 "2024-05-15T03:36:20Z")

</div>

A simple way to do this is to create two math columns - one that represents the current month and another that represents the expense date month - then relate the two together, and then do a rollup through the relation to get a sum.

For the math columns, use the following formula:

```auto
Year(Date)*10^2
+Month(Date)

```

Replace “Date” with the special current date/time value in the first math column, and replace it with the expense date in the second math column.

When you create the relation, you want to match the first math column with the second math column, and you should ensure it is a multiple relation.

And finally add the rollup and target it at the relation column, and select Sum-\>Expense Amount.

---

<div class="post-metadata">

**Author:** ![Aman\_Lalwani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aman_lalwani/32/75129_2.png) [@Aman\_Lalwani](https://community.glideapps.com/u/Aman_Lalwani)\
**Post date:** [May 15, 2024, 4:25am UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/3 "2024-05-15T04:25:16Z")

</div>

Hey Darrem,

Firstly thank you so much for your quick reply.

I am a beginner, so please bear with me. Here is the screenshot of all the columns including the two new columns you asked me to create. The values I see are a bit weird.

 ![Screenshot 2024-05-14 at 22.23.41](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/e/de14b3c185473885235ee6110a0c02ceca8d51f9.png)

I have also attached screenshots of the properties of each of these new columns.

 ![Screenshot 2024-05-14 at 22.24.01](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/e/eea73505368480ea1e554cd777d77ad03b96e1e6.png)  
 ![Screenshot 2024-05-14 at 22.24.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/1/1190fc3d3b8734235e91e3cf7f5b2a6c54a66a19.jpeg)

Could you please help me understand what is wrong here?

Plus, I do not know how to relate these two columns, could you elaborate a bit more?

Thank you so much again.

---

<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 15, 2024, 4:30am UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/4 "2024-05-15T04:30:44Z")

</div>

What you have there is fine, I would just set the precision to 1, and uncheck the “Use group separator” box. That should result in something that looks like `202404` (year 2024, month 4). It will still work the way you have it, but getting rid of the comma and extra precision makes it a bit more readable.

The relation is pretty straight forward, have a read and watch below:

> **[Relations | Glide Docs](https://www.glideapps.com/docs/automation/computed-columns/relations#building-multiple-relations)**
>
> Create relationships and link rows together.

The important thing is to match the first math column (current month) with the second math column (expense date month), and be sure to check the “match multiple” box.

If you get stuck, share some more screenshots.

---

<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 15, 2024, 4:34am UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/5 "2024-05-15T04:34:19Z")

</div>

oh sorry, I just looked again and realised your math column for Current Month is wrong. You should be replacing Date with “Now” - see below:

 ![CleanShot 2024-05-15 at 12.32.48@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/0/4037f065986a945bbe6086eb72bc32059469d7b0.png)

---

<div class="post-metadata">

**Author:** ![Aman\_Lalwani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aman_lalwani/32/75129_2.png) [@Aman\_Lalwani](https://community.glideapps.com/u/Aman_Lalwani)\
**Post date:** [May 15, 2024, 5:00am UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/6 "2024-05-15T05:00:46Z")

</div>

Thank you again, here is the outcome of what you just asked me to do.

 ![Screenshot 2024-05-14 at 22.57.37](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/c/fc48711078a8c9047c3b6a970a4bb79dac9b5ea2.png)  
a

Now, how can I display the total amount spend in the current month?  
Here is what I tried - the component at the bottom reads 650/202405. This does not feel right, I have spent around 8000 but it shows 650.

 ![Screenshot 2024-05-14 at 22.59.02](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/c/8ce286c1a68ecf257181d336ea5c597c3ed9227d.jpeg)

🙂

---

<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 15, 2024, 5:10am UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/7 "2024-05-15T05:10:03Z")

</div>

You missed the final step:

> [@Darren\_Murphy](#):
>
> And finally add the rollup and target it at the relation column, and select Sum-\>Expense Amount.

---

<div class="post-metadata">

**Author:** ![Aman\_Lalwani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aman_lalwani/32/75129_2.png) [@Aman\_Lalwani](https://community.glideapps.com/u/Aman_Lalwani)\
**Post date:** [May 15, 2024, 2:02pm UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/8 "2024-05-15T14:02:26Z")

</div>

True but this is what I get, 24. Something seems off.

 ![Screenshot 2024-05-15 at 08.01.17](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/a/4ab5cc466ab6a9122493e7194b62ce50123178c4.png)  
 ![Screenshot 2024-05-15 at 08.02.16](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/4/a4384bb406df5ac1408398d7f1f3c42f9be969ec.png)

---

<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 15, 2024, 2:39pm UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/9 "2024-05-15T14:39:33Z")

</div>

Change your “Amount Spent” column to number, then use the “sum” option in the rollup.

---

<div class="post-metadata">

**Author:** ![Aman\_Lalwani](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aman_lalwani/32/75129_2.png) [@Aman\_Lalwani](https://community.glideapps.com/u/Aman_Lalwani)\
**Post date:** [May 15, 2024, 5:34pm UTC](https://community.glideapps.com/t/best-way-to-show-monthly-summary-of-the-expenses-in-the-expense-tracker-app/73385/10 "2024-05-15T17:34:55Z")

</div>

It works perfectly, thank you so much for the help @ThinhDinh and @Darren_Murphy
