Calculating the difference between rows

Hi All,

I am trying to create a simple fuel tracker, where I log me fuel $/Ltrs and total KMs. For each row I would like to calculate the difference between the current KMs and preceeding row KMs to calculate the KMs travelled as a base for other calculations

An ideas on how to achieve this simply?

hi @Andy_Farquharson2 ,

you need to find the preceding value and that is the date before the date on ‘thisRow’.

this required a correctly formated date format. below an example.

in this table the values are already sorted, sometimes you need to sort the table first on dates.

i hope it helps,

cheers, Christiaan

1 Like

Thanks @Christiaan_Huizer , what is the formula that you have in step 01?

1 Like

hi @Andy_Farquharson2 , see below.

cheers, Christiaan

1 Like