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

Dynamic Filter based on date from another output

krishnagandhi
8 - Asteroid

Hi,

 

So i have some data where i need a filter to only include dates that occur after the beginning of the month. Basically i have an output that gives me a date and i need to filter my data from the beginning of that month.

krishnagandhi_0-1594226306106.png

So the above is my data, the final field is the one i need to filter. Below is the output where it gives me a data, but i need to only keep values that are  greater than or equal to the beginning of June 2020.

krishnagandhi_1-1594226362453.png

Not sure if this is possible to automate but it would help immensely from having to do a manual filter each time i run my workflow. in the above scenario i would only retain the first 2 records as the 3 record occurs in March.

 

I have attached both data inputs into a workflow below.

 

Thanks!

 

3 REPLIES 3
Blake
12 - Quasar

Hey @krishnagandhi - you could use a custom filter with the following expression to only get dates that started at the beginning of the current month : [Min_WorkDate] > DateTimeFirstOfMonth() 

 

Do you need to have records from the beginning of the prior month, as your example shows? If so, you could use the following : [Min_WorkDate] > DateTimeAdd(DateTimeFirstOfMonth(), -1, "months")

 

See the attached for an example of the filter. 

 

Blake_0-1594232582344.png

 

krishnagandhi
8 - Asteroid

This doesn't quite work because the date is dependent on the output of in Mode CCC Workdate. In this instance it is June so i need anything after June 1st but i also have historical runs so that is why this solution will not always work.

krishnagandhi
8 - Asteroid

Thanks that spurred a solution in my head as follows in case anyone else needs it:

 

krishnagandhi_0-1594238159053.png

 

Labels