Calculate difference between dates within a group and get values from a corresponding column.

Hi,
Here is the how the Input data looks like-
image

and the Output should look something like this-
image

The requirement here is, within a Group of n rows, if the difference between a Date and the other dates is 7 days or less then the value from ID column should be added to a new column (IDs).

It seems like I’ve to use Group Loop node here but I’m not sure which other nodes to use to get the results…
I started using Knime just last week.

Thanks…

date&time difference can get you the difference in days after you group your data with the loop

Hi @Asghar

Welcome to KNIME Forum.
And yes I think the GroupLoop is the way forward. I used it in combination with the Cross Joiner node to calculate the differences between all dates within a group. See this wf calc_difference_between_dates.knwf (42.5 KB)


gr. Hans

2 Likes

:open_mouth: ooooh… so that is how the Cross Joiner works…
Thank you so much @HansS

1 Like

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