Moving Aggregation with Percentage

Dear all,
As you can see from the table below, I know that in 2020 the revenue of a company is 100. I also know what is the expected increase in percentage in 2021 and 2022. How can I calculate the increase in value (the 4th column in bold) with Knime?

Year Value Increase in % Increase in value
2020 100
2021 10% 110
2022 5% 115.5

Hi @iiiaaa,
this is harder than it looks :smiley: You need a Recursive Loop Start paired with a Lag Column and a Math Formula. Please have a look at the workflow I attached. If you have data with more rows, you will need to adjust the maximum number of iterations in the Recursive Loop End.
Kind regards
Alexander

percentage.knwf (14.9 KB)

2 Likes

Hi there @iiiaaa,

if your input data is like you presented Column Expressions might help with following syntax:

var i

if ( i==null ) {
i = column(“Value”) * 1
}
else {
round ( i = i * (1 + column(“Increase”) / 100) , 5)
}

Java is option as well…

Br,
Ivan

2 Likes

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