Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Alteryx date filter

henrygeorge
8 - Asteroid

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 

DateName
28-01-2020Car
06-01-2020Bus 
05-12-2019Bike
05-12-2022Plane
05-02-2017Auto

It will read current date - 28-01-2019

 

My output should be as such - 

DateName
28-01-2020Car
06-01-2020Bus
05-12-2022Plane

 

 

 

 

3 REPLIES 3
afv2688
16 - Nebula
16 - Nebula

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')

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

RWvanLeeuwen
11 - Bolide

Hi @henrygeorge

 

See the attached workflow that uses the first day of the current month as a dynamic filter

 

custom dynamic date filter.jpg

 
Best,
 
Roland
 
Infotopics - Benelux partner of the year
Empowering business through analytics. See, Understand, Act!
OllieClarke
15 - Aurora
15 - Aurora

Hi @henrygeorge you can use the following filter

OllieClarke_0-1580209352640.png

 

Hope that helps,

 

Ollie

Labels