What's the method for calculating column totals in Airtable?

Hey everyone! I’m working on an Airtable project and I’ve hit a snag. Does anyone know how to get running totals for a column, kind of like what you can do in Excel?

Here’s what I’m trying to achieve:

Item    Running Total
5       5
10      15
3       18
7       25

I want each row to show the sum of all values above it, including itself. Is there a formula or trick to make this happen in Airtable? I’ve been scratching my head over this for a while now. Any help would be super appreciated!

I’ve tackled this issue before in my Airtable projects. The most straightforward approach I found is using a self-referencing lookup field combined with a formula. Here’s how:

Add a lookup field that references the same table and links to the previous record. Then, create a formula field with the expression:

COUNTA({Item}) * {Item} + IF(COUNTA({Previous Row.Running Total}) = 0, 0, {Previous Row.Running Total})

This formula adds the current item’s value to the previous row’s total. While it may not scale perfectly to very large datasets due to recursion limits, it works well for most cases. For larger tables, consider breaking the data into smaller chunks or using scripting if possible. Hope this helps!

hey Nova56, I’ve done this before! u can use a rollup field for this. create a new table with a single record, link it to ur main table, then use ARRAYREDUCE() in a rollup field. it’ll sum up the values above each row. lmk if u need more help!

To achieve running totals in Airtable, you’ll need to employ a combination of linked records and formula fields. First, create a new single-record table and link it to your main table. Then, in your main table, add a formula field using the ARRAYJOIN() function to concatenate all values above the current row. Finally, use another formula field with SUMARRAY() to calculate the running total from this concatenated string. This method, while a bit complex, effectively mimics Excel’s running total functionality within Airtable’s structure. It may require some tweaking based on your specific setup, but it’s a robust solution for maintaining running totals across your data set.