Replacing Missing value with previous value in the same column+1

Hello,
How can I replace the missing value in a column with the previous value (in the same column “the value above”)+1?

group number
A 1
A 2
A 3
A ?
B 1
B 2
B ?
C 1
C 2
C ?
C ?

To:

group number
A 1
A 2
A 3
A 4
B 1
B 2
B 3
C 1
C 2
C 3
C 4

Thank you!!

Hi @Suad_Alshammari , here’s 1 way to do this:

Input data (Same as yours):
image

Results (Same as yours):
image

Here’s the workflow: Replace missing value with previous value +1.knwf (30.4 KB)

3 Likes

@Suad_Alshammari , if you like Column Expressions you can exploit the function column(column_name, row_offset)


KNIME_project2.knwf (17.2 KB)

WARNING The workflow assumes that the dataset is sorted on (group, number) and that each group has at least one non-missing number value

1 Like