How to match Lag Column with other nodes to compare data before and after

Hello, expert, how can I compare the data contents and generate derived fields if they match?
For example: In the pH-1 field, if the values ​​of 7 consecutive data items increase, an “alarm” signal will be generated, and the column name is set to “CI_Alarm”. The current method that comes to mind is to use Lag Column first, but I haven’t thought of which node to use to achieve this result.

Hi,
you are on the right way with “Lag Column”. Your task is a kind of edge detection where you need to find the phases with increasing values in pH-1.

First you do the “Lagging”, then compare the previous value with the current. If the previous is bigger, then a new phase of increasing values begins.
I used the “rule based row filter” to get these rows. The math node after just adds a row number which acts as a Group-Identifier. As I assume that the first group starts in the first row I have to add 2 to the counter.

2 Likes