Additional Column Values of Group By Result

I have a numeric table and want to find the maximum value of column “RESULT” and the corresponding value in column “CONTEXT” for each unique value in Column “PARAM”. To put this very clear: The CONTEXT value i want belongs to the same row position as the maximum RESULT value that was extracted.

I tried this with a “Group By” node using “manual aggregation” method, which does the job except of the option of extracting the CONTEXT values. Unfortunately the Group By node resets the RowID so i can’t do the job afterwards by using the ID.

Any tips and hints are appreciated. Even a reasoning why this is not included as an default option of the Group By node would be very insightful for me.

PS: I do not want to solve this problem with a Python or other generic nodes since this is a very simple problem.

Thanks in advance
Chris

Welcome to KNIME Community Forum!

Could you please share sample data to show your challenge and expectations?
Happy KNIMEing!

Thank you @Kazimierz for your fast reply! Sorry, that i couldn’t make this clear enough at first.

Unfortunately i can not share the data but i try to make this clear in an minimal example: I have simulation data from a parameter sweep where PARAM was periodically sweeped. I want the maximum value of RESULT for each unique value occurency in PARAM and i want to know under which CONTEXT value this occurency happened. Here is an example:

@MagnoChris I was able to achieve expected outcome with the attached workflow

Please try it and let us know if this is what you were searching for.

KNIME_forum_2025_10_31.knwf (85.4 KB)

1 Like

Or you can use the RANK Node (one of my favorites)

3 Likes

duplicate row filter with max on your numeric column

2 Likes

@ActionAndi Ellegant! Good to know your RANK recommendation

1 Like

Thank you for your solution. Idk what the answer from @fe145f9fb2a1f6b means to be honest.

@Kazimierz, indeed @ActionAndi‘s solution is elegant but has its limitations: The aggregation method can only be “min” oder “max” - but of course this was my question and is a perfect valid answer to it.

If someone has an idea of how to generalize the aggregation method by still keeping the whole row: please let me know. For now; my question is anwered.

Again thanks for the fast replys.

1 Like

Just happy KNIMEing @MagnoChris

Hi,
the more generalized solution is shown by @Kazimierz : Just pick the aggregation function you need in the GroupBy node.

@fe145f9fb2a1f6b is known for his very short answers :slight_smile:
If you want to have just the max or min value you can use instead of my solution the “duplicate row filter” node with the according settings for the values you want to keep.