# How to calculate Running Total as of a certain date

**URL:** https://community.glideapps.com/t/how-to-calculate-running-total-as-of-a-certain-date/68154
**Category:** Ask for Help
**Created:** [November 27, 2023, 1:42am UTC](https://community.glideapps.com/t/how-to-calculate-running-total-as-of-a-certain-date/68154 "2023-11-27T01:42:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Technoladie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/technoladie/32/52202_2.png) [@Technoladie](https://community.glideapps.com/u/Technoladie)
#### Post date: [November 27, 2023, 1:42am UTC](https://community.glideapps.com/t/how-to-calculate-running-total-as-of-a-certain-date/68154/1 "2023-11-27T01:42:04Z")

</div>

Hi there,

I saw this post and wondered if there was a way to create a similar result, but based on the dates. Meaning, I have a table of transaction entries with dates and amounts. I would like to see a running total for the specific date in the row that takes into consideration all amounts from older dates (basically your current account balance).

---

<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: [November 27, 2023, 8:16am UTC](https://community.glideapps.com/t/how-to-calculate-running-total-as-of-a-certain-date/68154/2 "2023-11-27T08:16:03Z")

</div>

Seems like you forgot to link to the post you saw.

Anyway, I think you can use a query column to query all rows that belong to this row’s user and have a timestamp that is either equal to this row’s timestamp or before.

Then use a rollup to sum the amounts.

---

<div class="post-metadata">

### Author: ![Technoladie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/technoladie/32/52202_2.png) [@Technoladie](https://community.glideapps.com/u/Technoladie)
#### Post date: [November 27, 2023, 11:31pm UTC](https://community.glideapps.com/t/how-to-calculate-running-total-as-of-a-certain-date/68154/3 "2023-11-27T23:31:54Z")

</div>

Oops!

> [@Running Totals](https://community.glideapps.com/t/running-totals/41596):
>
> Hi Glide Community, Is there a way of calculating running totals in the Glide data editor? I am trying to replicate the below that can be done in Google Sheets but seems to be very difficult in Glide as roll ups are column specific, unless using a relation/lookup/specific array setups. [Screen Shot 2022-05-03 at 7.02.23 PM] [Screen Shot 2022-05-03 at 7.02.37 PM] Is there a way of doing a running total like this? I have tried a different ways with arrays and using the row index but still no …

---

<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: [November 27, 2023, 11:33pm UTC](https://community.glideapps.com/t/how-to-calculate-running-total-as-of-a-certain-date/68154/4 "2023-11-27T23:33:10Z")

</div>

Please let us know if you find any further challenge on implementing it.

---

<div class="post-metadata">

### Author: ![Technoladie](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/technoladie/32/52202_2.png) [@Technoladie](https://community.glideapps.com/u/Technoladie)
#### Post date: [November 27, 2023, 11:45pm UTC](https://community.glideapps.com/t/how-to-calculate-running-total-as-of-a-certain-date/68154/5 "2023-11-27T23:45:51Z")

</div>

So the challenge with the TimeStamp is that the transaction entries will include a Transaction date already (the transactions will be bulk loaded and then trend analysis will be done).

I thought about converting the date to an integer using the formula I found [here](https://community.glideapps.com/t/how-to-sum-values-based-on-date-daily-weekly-monthly/66313/2)…  
Year(Date)\*10^4  
+Month(Date)\*10^2  
+Day(Date)

But got stuck trying to sum the transactions for a specific day AS WELL AS all previous dates (but non of the future dates). The idea would be as follows…

Date : Amount : Balance as of this date  
3/1/22 : $10 : $10  
3/3/22 : $13 : $23  
3/4/22 : -$5 : $18  
3/6/22 : $100 : $118  
3/7/22 : -$25 : $93  
3/9/22 : $55 : $148
