Hello,

I have the below data:

KNIME_project5.knwf (4.6 KB)

I want to reach “result” column which depends on x,y and z columns. “result” column is constructed like that:

First,

x is the grouping variable
y is the sorting variable(ascending)
z is summing column
Then,
So for each goup(x), z is cumulative sum according to ascending y.

How can I do this using Knime.

I will be very glad for any help. Thanks a lot.

Hi @statman

Please find below a generic alternative solution that doesn’t need loops to provide the same results, although it is mathematically more involved to understand :

20200620 Pikairos Cumulative sum of consequent numbers in each group.knwf (43.5 KB)

The workflow is commented to make it easier to understand. Hope this is of help

All the best

Ael

5 Likes

Thanks @aworker . Very nice solution.

Best regards.

2 Likes

Thanks @statman for you kind words and for validating the solution

All the best,

Ael

1 Like

system
Closed
June 27, 2020, 2:35pm
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.