Exclude dates based on a set of rules

Hi there

I am trying to create a workflow that will exclude the first 6 days of data from a period of say two months. The criteria for the exclusion will test if the first 6 days have values that are less than the average value of the entire period. For example, I want to exclude if the daily vehicle volumes of the first 6 days are less than the average daily volume of the entire two months period.

So far I have tried using RowID to create a ordered list of dates then used multiple Rule-based Row Filter to exclude sequentially any one of the first 6 days of data if the daily volume meets the criteria of exclusion. I have not been successful in getting the results I want.

Any tips or help would be greatly appreciated.



You can use a “Date&Time Difference” node (after converting the date column) to calculate the days.
Then use a “Math Formula” to calculate the value column mean and at the end use a “Rule-based Row filter” node and input this rule: $value$ < $Mean$ AND $Days$ <= 6 => TRUE to exclude the values.



6 days.knwf (23.4 KB)

1 Like

Hi Armin

Thank you for your help.

But the calculated days column have the got the order of the dates wrong though. Based on the Date column, the days column should be 1 when the date is 2018-11-19 and 24 when is 2018-12-11. How can we reverse the order of days to ensure the first 6 days reflect the first 6 dates of the date column?


In the configuration window of the Date&Time Difference node you can change the settings as you wish. I chose the execution time, but you can change that.