I know this is difficult in Grist but I’m wondering if there is a way do it, even if complex.
I am creating a log to record boat trips on inland waterways. As you travel (or at the end of the day) you record the places you have been through, how long it took, how much fuel has been used, etc.
I have a column in the log table which is the ‘Point Kilometrique’ that is the distance of the place measured from a fixed point (usually the start of the waterway, or a junction), it’s abbreviated to Pk.
What I want to do is add up the differences between sequential rows (i.e. places visited or passed in the boat) and produce a cumulative distance travelled in a calculated column.
So the distance travelled is:-
(distance travelled in previous row) + (difference between Pk for this row and Pk for previous row)
Thus my formula needs two references to the previous row, unless there’s a more obvious way of doing this.