Tool Mastery

Explore a diverse compilation of articles that take an in-depth look at Designer tools.
Become a Tool Master

Learn how you can share your expertise with the Community

LEARN MORE

Tool Mastery | Date Filter

JoshKushner
12 - Quasar
Created
Date Filter.png

Note: The Date Filter tool was deprecated in Alteryx Designer version 2018.1 - its functionality was added to the Filter tool.

This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Date Filter Tool on our way to mastering the Alteryx Designer:

The Date Filter tool is a very tailored version of the Filter tool with an enhanced GUI for date picking.

The date picking GUI will always have today’s date outlined in blue and the selected date highlighted in grey. The GUI below should show that I am writing this on February 7th, 2018 and have selected February 1st, 2018.

1.png

The Date Filter tool filters data by 3 possible criteria:

  1. Between a Start Date and End Date
  2. Number of periods after a Start Date
  3. Number of periods before an End Date

  1. To filter data between a Start Date and End Date, select the first option in the configuration window.

The Start Date is selected from the GUI on top while the End Date is selected from the GUI on bottom. The GUI below should show a date range between February 1st, 2018 through February 28th, 2018.

2.png

  1. To filter data after a number of periods after a Start Date, select the second option in the configuration window.

After selecting the Start Date, define the type and number of periods to include in the data after the Start Date. Periods can be any of the following: days, weeks, months, quarters, or years. The GUI below should include all data 5 weeks after February 1st, 2018.

3.png

  1. To filter for data before an End Date, select the third option in the configuration window.

After selecting the End Date, define the type and number of periods to include in the data before the End Date. Periods can be any of the following: days, weeks, months, quarters, or years. The GUI below should include all data 5 weeks before February 28th, 2018.

4.png

While the Date Filter tool can used be for simple filters over exact date ranges, the Filter tool must be used for more complex date filters.

Complex date filters will use the Filter tool and DateTime Functions. A date filter could be complex because it uses another variable, is an irregular set of dates, or many other situations where the dates or periods aren’t fixed. The below example filters for data where the [Sample Date] is within 5 weeks of the [Start Date] which is set by a variable.

5.png

Find the Tool Mastery post for the Filter tool here!

By now, you should have expert-level proficiency with the Date Filter Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.

Stay tuned with our latest posts every Tool Tuesday by following Alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.

Comments
MsBindy
8 - Asteroid

I think this article might be a little out of date?  I can't find this tool on the palette.   But it looks like a version of this capability is in the regular filter tool.

JoshKushner
12 - Quasar

With the release of Alteryx 2018.1 the data filter tool was consolidated into the filter tol as many tools have been modified to have an HTML interface. This tool mastery is valid for all individuals who use versions prior to 2018.1.

patrick_digan
17 - Castor
17 - Castor

@MsBindy You are correct! The Date Filter was deprecated as of 2018.1 (March 6, 2018). The release notes are here. Under new features >>>> Tools

We have enhanced the Filter tool with a new expression editor, date filtering, and dynamic date options.

If you wanted to use a deprecated tool, you can right click on any tool in the tool palette and then click show deprecated tools:

Capture.PNG

 

Now the date filter shows up with a little bar to let you know that it's deprecated.

Capture.PNG

becki
8 - Asteroid

hmm, i'm still losing data when i try any filter.  i think it has to do with the data itself.  thanks though

 

Usamah22
8 - Asteroid

My date filter is showing strange results.

 

DateTimeToday()>=[Start Date]
AND
DateTimeToday()<=[End Date]

 

i have some dates that are not true but appear in the true, there are some that are not true and are correctly appearing in the false node.

 

Initially i though this was to do with the type but looking in excel the dates for both samples look the same. The below appeared in true today, 20th Nov 2019:

 

Usamah22_0-1574272307287.png

AsaelMAYA
5 - Atom

I find this article might be a little out of date.... and me as other user,  I can't find this tool on the palette.