Quite sophisticated and probably there are much simpler solutions, but the attached WF should do what you’re after.
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)