Group By Node : Result Based On Group By Specified Group

Hello Knime Masters,

I have a question if the GroupBy node (or any other node) can do the following.

Item Name Value
Item No.1 1
Item No.1 2
Item No.2 5
Item No.1 2
Item No.3 10
Item No.2 1
Item No.2 2
Item No.2 3
How to get the result like
Item Name Count Value
Item No.1 3 5
Item No.2 4 11
Item No.3 1 10

Thanks & Regards

You can use the group by node and configure the following (assuming that your value column has type double, integer or long):

group column: item name

Then in manual aggregation tab move value column over twice - once select „sum“ as aggregation method from the drop down and the second time select count.

You’ll then have the correct metrics and level of aggregation. The one thing that will require one more node is changing the column names to what you show in your example to count / value. You’ll can do this using column rename or table manipulator nodes.

4 Likes

hi Thanks a lot, its working

1 Like

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