Cumulative sum of consequent numbers in each group

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.

I found it:

1 Like

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 :wink: :

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 :smile:

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 :grinning:

All the best,

Ael

1 Like

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