How can I get the difference of values from different rows

references
#1

Result[ActiveRow(X)column(Z)= value[ActiveRow(X)column(Y)] - value[ActiveRow(X-1)column(Y)]

(XY) (XZ)
100 0 (100-0=0)
120 20 (120-100=20)
110 -10 (110-120=-10)
130 20 (130-110=20)
100 -30 (100-130=-30)

(Aleksi Alkio) #2

So… you want to calculate the difference from this row and one before?

#3

Yes, that’s what i want

(Aleksi Alkio) #4

You could read the last row’s key value with an expression MAXROW and it will create a ref column. Then you can read the value with a deref expression like [MaxRowKey].[Column]