02-07-2018 11:05 AM - edited 08-03-2021 11:27 AM
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.
The Date Filter tool filters data by 3 possible criteria:
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.
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.
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.
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.
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.
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.
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.
@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:
Now the date filter shows up with a little bar to let you know that it's deprecated.
hmm, i'm still losing data when i try any filter. i think it has to do with the data itself. thanks though
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:
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.