This workflow determines which event belongs to same cycle and assigns unique identifier for each cycle. This is done by marking first event in each cycle with unique identifier and then populating other events using Missing Value node. If every cycle begins with same event number (1) then determening is easy and done in bottom branch. If not then determination is done by comparing current event row value to following event value and is done in upper branch.
This is a companion discussion topic for the original entry at https://kni.me/w/jevz3Ac4xUBERx4c