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.