Column with accumulated sum?

Hi! I’m stuck finding the best way to have a column in a table that sums the accumulated revenue every month:

Any ideas?

4 Likes

Especially:

Also:

There are many ways to skin this cat, but the one I offered is:

  1. Create a column called OrderId with formula:
thisTable.Find(thisRow)
  1. Then your Accum. Revenue formula can be:
thisTable.Filter(OrderId <= thisRow.OrderId).Revenue.Sum()
7 Likes

Yes, this is perfect! Thanks @Connor_McCormick !

1 Like

@Connor_McCormick thoughts on how to efficiently filter for multiple accounts in the same table? i.e. a bank account statement having multiple running totals in the same column?

Currently using the “PreviousRow” Lookup solution given in other conversations but it is slowing down even my test doc:
thisTable.Filter(Ranked<thisRow.Ranked && Fund.Contains(thisRow.Fund)).Sort(true,thisTable.Ranked).Last()

Could you share an sample doc with an example of what kind of output you’re looking for?