How-to | Filter a dataset based on interactive date ranges#

In addition to exploring and filtering a dataset sample in the Explore tab, the interactive date filter can also be leveraged within a Prepare recipe.

The interactive date filter can be used in the dataset preview inside a Prepare recipe the same way as in the Explore tab of a dataset. Additionally, selected filters can be easily added as a step in the recipe.

To filter a dataset using the interactive date filter:

  1. Open a Prepare recipe.

  2. Click on the dropdown arrow of a date column and select Filter.

  3. Click the Filter on dropdown and select the filtering type (exact date, relative range, or date part).

  4. Modify the selected time period and its length.

  5. Click + Add as a Step.

In the example shown below, we choose to filter on the relative range Last 2 years.


After clicking + Add as a Step, a new step is added to the Prepare recipe script, which filters the dataset on the relative range we selected. By default, it is set to Only keep matching rows, and thus only keeps rows containing reviews from the last 12 months from today’s date.


It is also possible to change the recipe step so that it removes or clears either all matching rows or all non-matching rows.