knime

KNIME: How to add numbers on two matching columns


I am a beginner to KNIME, and am trying to add values together based on matching columns. enter image description here

I have three columns SKU, QTY on hand and batch. I need to add all the qty's on hand for matching sku and batches (sometimes the same batch can have multiple different sku's)

I have tried to use a simple set up of an excel reader and a row aggregator. However, the row aggregator only sums on either matching sku or batch and not both.

How would I be able to either change row aggregator to include both, or is there another tool that would be able to do it better?

Thank you in advance


Solution

  • I figured out a solution! I used the groupBy node. In here, I first defined which of the columns should be considered as grouping columns (SKU and BATCH). enter image description here Then under the aggregation tab, I summed the QTY. enter image description here