Member-only story
previousRow() in , a bad idea?
Why a button is your friend to track changes
I contributed in a discussion on how to keep track of sales in a table. The idea was to create a set up many makers feel familiar with. You take a value living on a previous row and or add or subtract a value. While this works very well in a spreadsheet (also in terms of performance), it is not the way. Interestingly, not because cannot handle this. Even the function to get the job done is simple as you see below.
We can use a filter based variation to get the same result since it is all about the rowIndex
.
We can even complicate the matter a bit and introduce various products. I asked ChatGPT for some inspiration and got a list of wood products you see partly in the table below: