Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Filter rows that have values older than 18 months

Daniela_Arenzana
5 - Atom

Hello,

 

I'm trying to filter/remove rows that are older than 18 months. Can this be done in one formula?

 

DateGroupItem

4/2018

TOOLS5900A
5/2018TOOLS5900A
12/2018TOOLS5900A
1/2019TOOLS5900A
7/2019TOOLS

5900A

 

Thank you,

 

Daniela

2 REPLIES 2
CarlDi
Alteryx
Alteryx

hi @Daniela_Arenzana - you can create a datetimetoday field in the formual tool and once you convert your current "Date" field into the alteryx format, use a datetimediff expression - then with the filter tool, remove entries that are greater than 180 days. hope that helps!

Kenda
16 - Nebula
16 - Nebula

Hi @Daniela_Arenzana 

 

I would just use a Filter tool with this expression:

DateTimeDiff(DateTimeToday(), DateTimeParse([Date], "%m/%Y"), "months")>18

 

The reason you have to use the DateTimeParse in the middle is so that the incoming date is formatted correctly in order to find the difference.

 

Hope this helps! 

Labels