Restarting Rank

Quite sophisticated and probably there are much simpler solutions, but the attached WF should do what you’re after.

Idea:

  1. 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

  2. Use a “Group Loop Start” with some inner nodes to do the numbering for each group

  3. Remove helper columns using the “Column Filter”

HTH,
Philipp

RankRestarting.knwf (11.4 KB)

3 Likes