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.
SOLVED

Filter Data - Greater than 4 months

JDong
8 - Asteroid

Hi All,

 

I have a date field with follow format:

 

Date
2021-04-22 00:00:00

2021-06-22 00:00:00

2021-07-22 00:00:00

2021-08-22 00:00:00

2021-12-22 00:00:00

 

In my data set I want to filter all records if the month is 4 months greater than current system month.

 

So since we are in April...data from August should be filtered.

 

Thanks.

5 REPLIES 5
Aaron_Harter
11 - Bolide

Hi @JDong

 

Try the attached Filter expression:

3.PNG 

JDong
8 - Asteroid

Hi Aaron,

 

It has also filtered also predated records ?

 

I see very less records now.

 

It should from entire dataset filter only those records that are greater than 4 months. 

 

Thanks

jeff_reynolds
10 - Fireball

Try changing the filter from '='  to '<'

 

example.jpg

JDong
8 - Asteroid

I seeit is not picking the NULL and ' ' date values. @Aaron_Harter  @jeff_reynolds 

 

How can I fix this ? 

jeff_reynolds
10 - Fireball

Not quite sure what your data actually looks like, but if your data has null / empty values that you want passed through the filter, you could add something like this to the logic:

withEmpty.jpg

. Now only data that is within the four months OR has no value will go through. 

Labels
Top Solution Authors