Skip to main content

How to create a running total or balance

  • February 10, 2018
  • 16 replies
  • 455 views

I’m not able to find an Airtable example of a simple checkbook register. Balance = Previous Balance - Debit + Credit. How would you do that in Airtable?

16 replies

Forum|alt.badge.img+17
  • Inspiring
  • 1124 replies
  • February 10, 2018

Can you describe your base’s Tables and Fields?


  • Author
  • New Participant
  • 1 reply
  • February 15, 2018

Can you describe your base’s Tables and Fields?


Like a simple checkbook register where the balance for each record is calculated automatically.

Date | Payee | Debit | Credit | Balance
2/13/18 | Deposit | 0.00 | $60 | $60
02/14/18 | Gas Station | $40 | 0.00 | $20


Forum|alt.badge.img+17
  • Inspiring
  • 1124 replies
  • February 16, 2018

I don’t know if I’m understanding, but you can make Balance to be a Formula field, and do a simple subtraction.


Forum|alt.badge.img+4
  • Inspiring
  • 485 replies
  • February 16, 2018

The issue here is that you can’t refer simply to the previous row in Airtable - in fact it’s really a meaningless notion in a database because it would depend on sorting, filtering etc. However, if you have the Blocks beta then you could find that the Pivot Table option could get you somewhere. Here’s an example:

In this example, I’m showing the dates grouped by the actual date - but there’s no reason not to group by week, month, quarter, year etc.

Not a running total but you get a current balance and it’s very simple.


  • Known Participant
  • 10 replies
  • February 16, 2018

This doesn’t work.
There is no way to say "let this cell have the value of the previous cell value + X.
Remember that Airtable is not a spreadsheet app, It misses all the calculating features for such needs. Better use Libreoffice Calc or Excel for this things.


Forum|alt.badge.img+1
  • Participating Frequently
  • 10 replies
  • March 22, 2018

This doesn’t work.
There is no way to say "let this cell have the value of the previous cell value + X.
Remember that Airtable is not a spreadsheet app, It misses all the calculating features for such needs. Better use Libreoffice Calc or Excel for this things.


i am looking to do something similar - ran out of ideas but will keep trying


  • Participating Frequently
  • 5 replies
  • March 22, 2018

I tested and did that with Blocks. But they won´t be available in the long term in free version, so…


Forum|alt.badge.img+18
  • Inspiring
  • 1691 replies
  • April 27, 2018

If a simple display of the “Current Balance” (active, right now) would be sufficient, I can definitely help anyone do that simply and in an automated fashion.

However, if you really need to see the “Historical Balance” (the balance after each change, in a chronological record) this is a way to do it, but it’s not simple, and requires a little upkeep. We have a resident :mage: who figured this out and posted about how to do it in the #show-and-tell section:

But respond back if you’d be satisfied to just be able to see the Current Balance (always and only the Current Balance), and I can definitely help you with that.


  • New Participant
  • 2 replies
  • August 7, 2018

If a simple display of the “Current Balance” (active, right now) would be sufficient, I can definitely help anyone do that simply and in an automated fashion.

However, if you really need to see the “Historical Balance” (the balance after each change, in a chronological record) this is a way to do it, but it’s not simple, and requires a little upkeep. We have a resident :mage: who figured this out and posted about how to do it in the #show-and-tell section:

But respond back if you’d be satisfied to just be able to see the Current Balance (always and only the Current Balance), and I can definitely help you with that.


I’d like to be able to see the current balance. I’ve been running a spreadsheet on Google for my new business, tracking expenses for each individual item and then giving me a profit margin in both dollar and % amounts. I’m having a whopper of a time trying to get Airtable to do the same thing. I feel like Airtable will be great in the long run, that it can display my data and integrate with more solutions eventually than a simple Google spreadsheet can… and visually I like it better. But having a difficult time getting going.


  • New Participant
  • 3 replies
  • September 25, 2018

The totals line at the very bottom of the spreadsheet does allow you to choose “Sum” for an individual column, but I haven’t figured out a way to do a running total either. It’s a basic formula in Excel that would look something like =SUM(A$2:A2) and then dragged down… but this doesn’t work in Airtable.

And the other problem with the sum total at the very bottom is that it will adjust if you filter records - say if you wanted to view the past 30 days. Anything prior to that filter will not be accounted for in that column total. :frowning:


Forum|alt.badge.img+18
  • Inspiring
  • 1691 replies
  • September 25, 2018

The totals line at the very bottom of the spreadsheet does allow you to choose “Sum” for an individual column, but I haven’t figured out a way to do a running total either. It’s a basic formula in Excel that would look something like =SUM(A$2:A2) and then dragged down… but this doesn’t work in Airtable.

And the other problem with the sum total at the very bottom is that it will adjust if you filter records - say if you wanted to view the past 30 days. Anything prior to that filter will not be accounted for in that column total. :frowning:


“Views” will be your friend here. A “View” represents a new scope, or query against your data.

You can create a view called “Running Total” that has a filter on it that you never change that looks like this:

This will always show records with dates up to and including today.

To achieve a view where you see records for the last 30 days grouped together including their sum for just the 30 days, but still see the total running balance up to today, create a formula field with a formula like this:

IF(
   IS_BEFORE({Date}, DATEADD(TODAY(), -30, 'days')),
   "1 - Before",
   IF(
      IS_BEFORE({Date}, TODAY()),
      "2 - 30 Day Window",
      "3 - After"
   )
)

Then you can group by this field and you’ll see three groups, all the “before” records, all the “30 day window” records (which is a rolling window based on TODAY()), and all the “after” records. Each group will have its own summary bar, but you’ll still have your total summary bar for all records at the bottom.

You just have to get creative with designing views, or queries against your data.


  • New Participant
  • 3 replies
  • September 25, 2018

“Views” will be your friend here. A “View” represents a new scope, or query against your data.

You can create a view called “Running Total” that has a filter on it that you never change that looks like this:

This will always show records with dates up to and including today.

To achieve a view where you see records for the last 30 days grouped together including their sum for just the 30 days, but still see the total running balance up to today, create a formula field with a formula like this:

IF(
   IS_BEFORE({Date}, DATEADD(TODAY(), -30, 'days')),
   "1 - Before",
   IF(
      IS_BEFORE({Date}, TODAY()),
      "2 - 30 Day Window",
      "3 - After"
   )
)

Then you can group by this field and you’ll see three groups, all the “before” records, all the “30 day window” records (which is a rolling window based on TODAY()), and all the “after” records. Each group will have its own summary bar, but you’ll still have your total summary bar for all records at the bottom.

You just have to get creative with designing views, or queries against your data.


That is just way too complicated for an average user that just wants to see a running total next to each entry - like the check book example that was given.


Noamsay
Forum|alt.badge.img+13
  • Participating Frequently
  • 29 replies
  • January 26, 2020

That is just way too complicated for an average user that just wants to see a running total next to each entry - like the check book example that was given.


Hey,

I got the same question from my client, so I created a video tutorial:

How to show a Running total on Airtable? (6:40 min)

Here is the link to the base used in the tutorial.

Hope it helps!

Noam


Forum|alt.badge.img+1
  • Participating Frequently
  • 7 replies
  • September 30, 2020

Hey,

I got the same question from my client, so I created a video tutorial:

How to show a Running total on Airtable? (6:40 min)

Here is the link to the base used in the tutorial.

Hope it helps!

Noam


Hi Noam,
I am trying to do this but for hundreds of records. How did you quickly populate the 1-1 and 1-to-many to copy in? I’m having a terrible time trying to figure out setting up a cashflow report with a running bank balance.


  • New Participant
  • 2 replies
  • November 11, 2020

Hey,

I got the same question from my client, so I created a video tutorial:

How to show a Running total on Airtable? (6:40 min)

Here is the link to the base used in the tutorial.

Hope it helps!

Noam


THIS IS AMAZING AND INCREDIBLY HELPFUL! Thank you so much.


stenkate
Forum|alt.badge.img+9
  • Inspiring
  • 24 replies
  • April 20, 2023

Hi Noam,
I am trying to do this but for hundreds of records. How did you quickly populate the 1-1 and 1-to-many to copy in? I’m having a terrible time trying to figure out setting up a cashflow report with a running bank balance.


A late reply, but maybe useful for other future users:

I haven't implemented it myself, but you can have a look at an automation for this here by community user @TheTimeSavingCo:

https://thetimesaving.company/posts/Accumulative%20Charts?type=projects&referringPage=projects