We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to use a filter

Adam-Adam
6 - Meteoroid

Hi All,

 

Basic question, how do I use a filter.

The goal is to filter by 18 months prior to today's date.

 

What is the formula I enter in "Custom Filter"

 

Thanks

4 REPLIES 4
Adam-Adam
6 - Meteoroid

Follow up remark.

 

Could I also get the "Custom Filter" for:

 

12 months to 3 months ago today

i.e. 04/07/2021 - 04/07/2022

 

Thanks

Felipe_Ribeir0
16 - Nebula

Hi @Adam-Adam 

 

Take a look at the attached workflow.

 

1) The goal is to filter by 18 months prior to today's date:

[Date] >= DateTimeAdd(DateTimeToday(), -18, 'months')

 

Felipe_Ribeir0_0-1665148661409.png

 

 

2) 12 months to 3 months ago today:

 [Date] >= DateTimeAdd(DateTimeToday(), -12, 'months') and [Date] <= DateTimeAdd(DateTimeToday(), -3, 'months')

 

Felipe_Ribeir0_1-1665148676697.png

 

 

If the provided answer helped you to solve the problem/was correct, please accept it as a solution :)

 

Thanks.

binuacs
21 - Polaris

@Adam-Adam one way of doing this with the DateTimeAdd function. you can find the details in the below link

 

https://help.alteryx.com/20221/designer/datetime-functions

 

binuacs_0-1665148590233.png

 

Felipe_Ribeir0
16 - Nebula

Hi @Adam-Adam 

 

It worked?

Labels
Top Solution Authors