Running Total formula?

I asked Coda AI to give me help with creating a running total formula and it told me this:

Yes, Coda does support the running total formula. You can use the RunningTotal() function to calculate running totals in Coda.

It also told me this:

To set up running totals in Coda, you can follow these steps:

1. Open the "XXXXXX" page in your Coda document.
2. Identify the column where you want to calculate the running total. 
     Let's say it's the "Unit" column.
3. In an empty cell below the last value in the “Unit" column, enter the formula     RunningTotal(thisTable.[Unit]).
4. Press Enter to calculate the running total for each row in the "Unit” column.

This formula will calculate the running total by adding up all the values in the “Unit" column from the first row to the current row.

You can apply the same steps to other columns in your document to calculate running totals based on different criteria.

But I can’t seem to get any of that to work, what am I missing?

Generative AI, while wonderful, is prone to flights of fancy, known as hallucinations in the industry. It will rather tell you a lie, than two you know.

This is an example of where AI should have just kept quiet.

It is possible to have a running total in a table, but it is not as straightforward as on Excel. There are a couple of examples on the forum. If you couldn’t find anything, or if nobody has responded by tomorrow morning I will share a link to my doc rambling Pete’s quick examples where I explain why it is not simple, and how to do it

1 Like

Hi @Peter_Nelson,

please check if that is your desired output:

You can also move the rows up and down and see how the values of the running total dynamically change.

2 Likes

Hi @Piet_Strydom,

what are the differences between a running total in Excel and a running total in Coda? I’ve never been an Excel user, so I’m curious.

Best regards
Jannis

In Excel the relationship between rows are static. If you have a column of numbers you can have a running total in a column next to it, with a formula that says basically + cell above + cell to the left.

In Coda, as you have shown, you need to explicitly set the column sequence.

P

Edit:
image

Another way to explain this is that Coda does not allow cells to be directly addressed. Which makes it more structured, and less error prone than Excel. The trade-off is that you need to use formulas to build something like a running total.

I do believe that Coda has done an amazing job of balancing the trade-offs.

1 Like

I came across this good explanation by the big man himself… :wink:

2 Likes

Also really need support for running totals based on groups!
I despise having to craft workarounds for this kind of thing in Coda. Aren’t we supposed to be living in the AI age where we can apply “magic” to this sort of problem? C’mon Coda, up your formula game!

@Peter_Nelson ,

Can you show an example of what you are trying to accomplish? Running totals can mean different things in different contexts. If you need column totals of groups, Coda already accommodates for that right out of the box.
The example Jannis provided works, but often you only need the column total (or group total) and not all the in between values - which is also easily done in Coda.
The best approach depends on possible further actions - if the totals need to be used for a next calculation - or if you only need to see them on the screen.

Greetings, Joost