row counter over partitions

Hi,

I´m trying to set up a counter to rank items in a list. The count should increase by 1 for every item in group and should restart counting from 1 whenever the ItemGroup changes.

I did something similar in SQL with the count over() partition by() function but can´t figure out how to do it in KNIME. I would be very grateful to receive some input from the community.

Here is the source data:
source

This is what the outcome should look like:
destination

Hi @e2dboden

For this you can use the Rank node, and configure it like this:

.
gr. Hans

7 Likes

Thank you very much @HansS. Your solution works exactly as expected.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.