could you provide an example and say again what should happen with the sum_price. What does get aggregated in which way? If you want to do things with previous or following rows there are several principal options:
There is the LAG node to access earlier lines.
You can use some sort of artificial ID or even do a Restart within a rank/ID.
Quite sophisticated and probably there are much simpler solutions, but the attached WF should do what you’re after.
[33]
Idea:
Use the “Lag” + “Rule Engine” + “Missing Value” nodes to determine, whether the current row changes its value compared with the previous one and to create groups of consecutive rows
Use a “Group Loop Start” with some inner nodes to do the numbering for each group
Remove helper columns using the “Column Filter”
HTH,
Philipp
RankRestarting.knwf (11.4 KB)
Also the Missing value node allows to access previous and following rows. One could combine that. Cf. this discussion .