My situation: I have a table with some columns in one of them there are Names that repeats. I want to count each one of them into groups and I can do that with GroupBy node but I can not find solution that each group count starts from 0 so from start.
I want to create column that will show me following result:
All I can get so far is
Thanks in advance.
Hi, in an attachment, you can find 2 solutions to your problem. The first idea is to: 1. Sort your table by column with names 2. Use a "math formula" node to add ROWINDEX field 3. Use "groupBy" node to find the minimum value of ROWINDEX for each Name 4. Join result in the original table and subtract min(ROWINDEX) from ROWINDEX field. The second idea is simpler — use “Group Loop Start” node and in each iteration use "math formula" to add ROWINDEX. In other hand, you can use "Java Snippet" node and just write your own Java code to count occurrences of each Name. If your table is huge, this (probably) will be faster than first 2 solutions.