Hello Knime experts!
I need an elegant way on how to carry the value in the column forward (down the table) until it meets a reset condition.
Here is a simple example:
column1 has flag values (1, 0, or -1).
column2 has values for the rows where column 1 is equal to 1, otherwise has zero
I need to calculate column3 with following logics:
if (column1 = 1 then column2 same row value,
else if column1 = 0 then column3 previous row value (above value),
else 0)
An exact example, to make it 100% clear:
column1: 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0
column2: 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 13, 0
column3: 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 13, 13
All ideas are welcomed!