Cumulated count for grouped data

Hi,

Taking a scenario of 3 members aged 55, 57 and 58 and trying to represent their ages up to the time they reach age 59. My current data is like this:

Member 1 - 55
Member 1 - 55
Member 1 - 55
Member 1 - 55
Member 1 - 55
Member 2 - 57
Member 2 - 57
Member 2 - 57
Member 3 - 58
Member 3 - 58

I would like to represent it like this:
Member 1 - 55
Member 1 - 56
Member 1 - 57
Member 1 - 58
Member 1 - 59
Member 2 - 57
Member 2 - 58
Member 2 - 59
Member 3 - 58
Member 3 - 59

I am trying to build future cashflows for these members ie they are a given age currently and I want to project calculations in yearly intervals in the future up to a certain age. Unlike excel where I could easily list members by row and project my calculations by column (in the form of a matrix), I believe in KNIME we can only do calculations by row and hence why I need to figure out how to manipulate my data in format above and then it will be easier to proceed with my projection calculations.

Hope this is clear, looking forward to suggestions as to how I can achieve this. Thanks.

Hi @ShivamChauhan welcome to KNIME Forum

I created a workflow cumulated_count.knwf (26.0 KB)
as an example to solve this problem. It uses a GroupLoop, that means that the calculations within the loop are done for every group member. The Math Formula uses the Rowindex to do the calculation.
Schermafdruk van 2022-01-06 09-19-43
gr. Hans

3 Likes

Thanks @HansS, this is working - much appreciated

Shivam

1 Like

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