I checked some of your formulas for the doc you posted and there will definitely be issues with circular references. I would not rely on previous row for any of your formulas and I think everything can be done based on the order of date and time. If you’re looking for a balance, it’s a sum of everything filtered by equal to or less than the date and time of that row.
You can also look at creating a couple more columns to hold some of these values so you don’t have one column running nested If()
statements.
I added new lines to one of your formulas to better read it and see what it was doing and it’s quite a bit to ask of one column and references previous rows. So every time the doc is updated in any way, this column needs to not only re-run for every row, but it does it repeatedly because each row is changing every time another row is updated.
If(
thisRow.Type=[DMonth Settle],
If(
thisRow.Account1=[Global Cash] AND thisRow.Account2=[Month Cash],
thisRow.[Prev. Row].DMonth-thisRow.Amount,
If(
thisRow.Account1=[Month Cash] AND thisRow.Account2=[Global Cash],
thisRow.[Prev. Row].DMonth+thisRow.Amount,
thisRow.[Prev. Row].DMonth
)
),
If(
thisRow.Type=Expense,
If(
thisRow.Account2=[Month Cash],
thisRow.[Prev. Row].DMonth+thisRow.Amount,
If(
thisRow.Account2=[Global Cash],
thisRow.[Prev. Row].DMonth-thisRow.Amount,
thisRow.[Prev. Row].DMonth
)
),
If(
(thisRow.Type=[Loan for me] OR thisRow.Type=[Settle on me]) AND thisRow.Account1=[Month Cash],
thisRow.[Prev. Row].DMonth+thisRow.Amount,
If(
(thisRow.Type=[Loan on me] OR thisRow.Type=[Settle for me]) AND thisRow.Account1=[Month Cash],
thisRow.[Prev. Row].DMonth-thisRow.Amount,
thisRow.[Prev. Row].DMonth
)
)
)
)