Calculate next row based on previous row from another column

Hi Everyone,

I would highly appreciate your ideas/help with creating a logic to make the following calcs.

From row 3 for each Company (ABC and XYZ) I need to calculate Start and End for every month.
I have data for the first month only and each next month should apply the logic
Start is E3=F2 and End is F3=E3+D3 and so on

Thanks a lot.
P.S. I’ve tried Lag Column, Column Expressions and Java Snippet (simple). The challenge I have is implementing lF…ELSE where I have logical and math conditions together.
e.g Take End value for Month 1 and insert into Start value Month 2 when i’s missing, then calculate Month 2 End.

Hi @fokusss and welcome to the Knime Community.

It is not clear what’s the input data from the screenshot and from what you have explained.

It is also not clear what the rules are and what the issue/challenge is. You mentioned a few things at the end, but they all sound incomplete.

What is the help that you are asking?

This can usually be done in Column Expressions, which you said you have tried. What have you tried?

That’s where the Lag Column will come into play, and then possibly use some Rule Engine. Don’t expect everything to be done in just 1 node.

But still not clear what’s the input data, and what the ask is.

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