Seems like you could also use a loop approach as seen here, but use the iteration number +1 as the count instead of moving average.
You would have to group by consecutive as well though.
Seems like you could also use a loop approach as seen here, but use the iteration number +1 as the count instead of moving average.
You would have to group by consecutive as well though.