Accumulation of Column

Hi there,

I’m a bit new to KNIME, so this might be a simple question for the most of you.
I’ve a table with the total volume of sales from each customer. Now I’d like to accumulate these in a new column from 0 to 100%. Is there any node for this problem?


You can use the Moving Aggregation Node with Cummulative Setting switched on in the node dialog. Select the Column you want to accumulate and use the Sum Function.

Thank you :slight_smile:
That worked very well. Now i’ve a column with the accumulated volume.
But there is no option to turn this into percent, isn’t it?
I think about sth like this:
ID Bought Sum(Cumulative) Percent Percent(Cumul.)
1 3 3 30% 30%
2 1 4 10% 40%
3 6 10 60% 100%

Ok in that case i would use a GroupBy Node (in addition and parallel to the Moving Aggregation Node) to sum up all values of the respective column of interest. Turn the sum value into a flow variable via “Table Row to Variable” Node. Connect the output of the Moving Aggregation Node and the FlowVariable Port of the Table Row to Variable Node to a Math Formula Node. Then just divide the Moving Aggregate Values of the column by the column sum of the GroupBy Node to get an additional column with percentage values.

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