I’m trying to create something like below. Basically I have a list of records with dates and metrics, I wanted to group records based on rolling 7 day window and give the min and max day for that 7 day period. How can we accomplish this in knime ?
See this wf 7-days-window.knwf (22.6 KB). When your date column has also a date-format, you can extract the week number by using the Extract Date & Time Fields node.
gr. Hans
Thanks for your suggestion, I initially thought about this approach but was unable to use the week number to group records as I wanted the window to be a 7 day dynamic rolling window, meaning if the current day is Tuesday then I wanted the records for prior 7 days from Tuesday.
But I was able to use an alternative approach to group records for rolling 7 day window. Please find the workflow attached.
Unfortunately your wf is empty… (uncheck: Reset Workflow(s) before export), so I can’t see what is actually happening in your wf. But I see you found a solution yourself, top!
Maybe you have time to check out the Window Loop Start node, that is designed to create a rolling window.
Try this workflow. It produces the min/max values for any arbitrary sized window (currently set to 7.) Each date in the output table has the min/max values for the entire window. The workflow filters out dates which don’t have a full size window.