Alteryx date filter
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Alteryx Team,
How do I exclude the previous months and years to my current date
Eg today's date is 28-01-2020
It will take all days that are January 2020 and future and exclude December 2019 and further down automatically
This is my input table
Date | Name |
28-01-2020 | Car |
06-01-2020 | Bus |
05-12-2019 | Bike |
05-12-2022 | Plane |
05-02-2017 | Auto |
It will read current date - 28-01-2019
My output should be as such -
Date | Name |
28-01-2020 | Car |
06-01-2020 | Bus |
05-12-2022 | Plane |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @henrygeorge,
You could use the following formula on a filter tool to get only the actual data and from the previous month:
REGEX_Replace([Date], '(\d+)\-(\d+)\-(\d+)', '$3\-$2') = Datetimeformat(datetimenow(), '%Y-%m') OR
REGEX_Replace([Date], '(\d+)\-(\d+)\-(\d+)', '$3\-$2') = Datetimeformat(datetimeadd(datetimenow(),-1, 'months'), '%Y-%m')
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @henrygeorge
See the attached workflow that uses the first day of the current month as a dynamic filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
