Index column based on another column value


I have a KEY column in which a certain value gets repeated different times in my dataset. I have created a new column called COUNT which counts how many times that key value appears in the data. I need a third column which will be a kind of INDEX based on the key value, so each KEY will start on 1 and then grow 1 by 1 until the key value changes and starts on 1 again.

It would look like this:

AAA01 3 1
AAA01 3 2
AAA01 3 3
BBB02 2 1
BBB02 2 2
CCC03 1 1
DDD04 2 1
DDD04 2 2



Appreciate any help!



using a group loop and the math formula node easily solves this - an example is attached. However, if you have a large number of KEYs then you might want to think about a solution that is less demanding computationally.

Best wishes,


Thank you very much!!