Running Total (Sum, Average, Median, etc)

Does anyone know how to do a running total?

In Excel it would be easy: Prior Result + new Result = Running Total thus far
But I can’t figure it out in Coda.
image

I need this so that I can calculate the payback period on a customer.
E.g. A customer costs $3,000 to acquire and they are paying a variable amount per month (based on usage of their product). I want to show that, for example, at Month 3 we’ve made our money back. Anyone have an idea how to do this?


EDIT
A workaround that I’m currently using is showing the average payback period. I do this by dividing Cost of Acquisition by the average of the Profit column. But this has obvious deficiencies.

For example if someone’s usage skyrockets late in the year, it skews the average to make it seem like we were profitable much sooner than we were.

For example:
cost of acquisition = $10,000
month profit
1 $100
2 $100
3 $100
4 $100
5 $10,000

Average payback period = 2 months
Actual payback period = 5 months

An ability to do a running total is vital in this case. Would love any advice someone has.

Hey @cnr ,
this is kind of tricky in Coda right now but there is a working solution.

I’ve described it here

Let me know if you need help implementing it.

1 Like

Hi @Daniel_Stieber I’ve been having a similar issue with a need for a running total calculation. Does anyone know if this is a feature/formula that is going to be introduced?

Hey Michael, can you provide some more information what do you want to achieve?

You can use sum() to create a total of a list/column. If you want to just show the total at the end of the table, you can use the the native footer bar of the table. If you want an ongoing total in each row, you can use the way linked above.
I don’t think there is something going to be introduced right now.

If you struggle, you can share a doc/example and I‘ll have a look.

1 Like

Okay - so I’m almost there - CORECTION - it worked!

Requirements:

  1. you have your table sorted
  2. you’re adding new row at the top or in the middle of the table
  3. you need a running balance
  4. the running balance column needs to sum from bottom to top

Current Solution:

  1. using rank - create a Visual Position column (link to thread)
  2. Using filter - create your running balance column
  3. be sure the running balance column accounts for the first row with a zero & an if statement
  4. be sure you have a first row that has a zero dollar amount

Formulas in the screenshots

1 Like

This may help you as well:

2 Likes

Thanks @shishir!

Out of curiosity - Is there a way to combine the PreviousRow formula and the CumulativeTotal formula into one to avoid having an extra column, PreviousRow? I’d like to try an apply that methodology to this section and other areas of my document if so.

@Justin_VanDervort how are you getting your raw bank feeds into Coda? Manually or?

I know one can pay ($5/month) for Tiller to scrape your bank feeds into Google Sheets, and then create a one way sync from that Google Sheet to a Coda doc using Google App Script (thx @Al_Chen_Coda). But I’m wondering if you’ve found a simpler way. :upside_down_face:

1 Like