Grist's PREVIOUS() function fixes running totals that break when you insert a row

Adding Window Functions to a Spreadsheet

Grist's PREVIOUS() function fixes running totals that break when you insert a row

In traditional spreadsheets, a running balance formula like =C3+B4 silently breaks when you insert a row: the reference shifts to the wrong cell and the total is wrong from that point on. Grist's PREVIOUS() function solves this by ordering records by a column you specify, not by their physical position. Insert or delete rows anywhere and balances recalculate correctly. The function also supports grouping, so each cardholder can have their own running total.

To a traditional spreadsheet, “the previous transaction” means “the cell above”. The two agree only as long as nobody rearranges anything.

More from this day

2026-11-04