Calculation between row 1 and row2 condition with an ID

Hello Community,
I am a new user of knime, and I built a workflow and I blocked I don’t know how to achieve this with knime,I would like to do some calculations between rows according to an ID.
I have an ID z that has records of dates. On date1 a, a record x was registered for date2, and then on another date1 b another record y of date2 was registered, and I want to calculate the difference of days between date1 b and x for the same ID z.
In the picture, you can find more clear idea of what i want to achieve:
2022-09-26 21_22_08-calculations.xlsx - Excel

Hi @mellania and welcome to KNIME Forum

See this wf calc_diff_row1_row2.knwf (29.2 KB).
Schermafdruk van 2022-09-26 21-42-19
gr. Hans

3 Likes

It works perfectly, thank you for your help and time

2 Likes

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