I would like to get the output as a repeating count of repeating rows. Consider AC as the input row which repeats itself from AC1 to AC6. I would like to get the output as new column with count for each group as shown in table. Please let me know the procedure. Thanks
This is rather complex to do with native nodes, but easy with a java snippet.
Use two fields: one is a counter, the other the last field.
Then per row: Extract the number from the AC column. compare it to the lasts column. If it is larger output the counter. If it is smaller increase the counter and output it. Then store the number in the lastnumber field.
Understandable?
Hi Ferry. Thanks for your reply. Actually I am new to KNIME. And I have never used java snippet before. So the explanation is difficult for me to put into use.
Oh, I just realized that you have a fixed length for each group, that makes it waaaay more simple.
Have a look at the attached workflow. It iterates over your input by chunks of 6 rows. The Loop End concatenates all chunks again, and adds a column with the number of the chunk it was in.