How to compare a column's value from one row to the next one?

Hello Knimlings,

I want to compute if a value is increasing or decreasing from one row to the next row.

E.g.:
The Input

Row0 3
Row1 6
Row2 4

should result in

Row0 3 -
Row1 6 1
Row2 4 0

where 1 is incresing value and 0 is decreasing value.

Is this possible using Data Manipulation nodes?

 

Best regards

Ulja

You can create a shifted column with the Lag Column node and based on that info, you can compute the desired output using the Math Formula or a Java Snippet node for example.
 

Thank you aborg. Lag Column node does the job.