Apps in Alteryx: how to create a date range filter

by Sylvie Imbert

Last week at the Data School we had a whole week about building apps in Alteryx and using APIs to pull out data. If you are wondering what apps are, do have a look at Matthew’s blog post who does a very good introduction.

Interface tools are used when building the app to allow the end user to select their desired parameters (which is what, ultimately, makes an app). These are generally pretty straight forward to set up, however if you would like to all the use to choose a date range to filter on instead of a “classic” from or before date, then you might be left wondering how to do that (at least that’s the position I found myself in during our Friday project!).

The answer lies in using 2 of the same date interface tool on the same filter tool:

First, set up your filter as a basic filter, using a range parameter:

Then drag your first date interface tool, being careful to connect the Q to the lightning bolt of your filter tool, which will make an action tool appear. This will be your “start date” tool, which you can rename “choose your start date”. In the action tool, select “Update Value (Default)” and drill down until you have the Operands options, from which you select the “StartDate” option as we are using a basic filter.

Drag another date interface tool, connecting the Q to the same lightning bolt as previously. This time, we are setting the end date, so rename your tool accordingly “Choose end date”. In the action tool, select the “EndDate” option under the Operands selection.

This set up will then allow the user to choose a date range when using the app:

Thu 21 Nov 2019

Fri 25 Oct 2019

Thu 24 Oct 2019

© 2022 The Information Lab Ltd. All rights reserved.