Four rows aggregation

Dear Knimers,

Please need help for below logic to be implemented in knime, need to add four rows like shown

Year Week Sale Expected Result in Knime
2021 18 15 56
2021 17 27
2021 16 14
2021 15 0
2021 14 0 53
2021 13 15
2021 12 38
2021 11 0
2021 10 15 105
2021 9 59
2021 8 0
2021 7 31
2021 7 10 50
2021 6 28
2021 5 12
2021 4 0

image

Thank you

1 Like

Hi @Prag_Mor

Please find a possible solution to your request. To achieve it, I have created a column with the “floor” of the row index when divided by 4, which then can be used to group the rows with same “floor” value and aggregate the sales by their sum:

20210506 Pikairos Four rows aggregation.knwf (39.5 KB)

Hope this helps :slight_smile:

Best

Ael

5 Likes

@aworker Thanks a lot it worked

2 Likes

@Prag_Mor My pleasure :smiley: !

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