Looping over columns and subtracting the next column values from the current column values
Dear KNIME community,
I am new to KNIME, so sorry for my ignorance. I have an excel sheet containing current stock value (Total Stock) + the weekly demand (week1, week2, week3, up to week99).
I am trying to create a new table that has all the results of current stock - next week = result of current week. So the result of week 1 would be Total stock - week1 = ResultWeek1, then ResultWeek1 - week2 = ResultWeek2, then ResultWeek2 - week3 = ResultWeek3 and so on.
My source data looks like this:
In excel the formulas would look like this:
And the output would be this:
I have tried the math formula (multi column) but I cannot figure out how to do it.
Does anyone have an idea how I can do this using only the standard nodes? (Excel file attached)
Thanks a lot for your support!