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

Dynamic Date Filter

Karl_Spratt
8 - Asteroid

Hi Community,

Need some help I'm trying to filter out ( I will use the false anchor of the filter) 

I'm trying to say ToDate([actual_shipment_date]) <= DateTimeToday()-730  

If the Shipment date more than the last 2 years dynamically show it as a true. 

that way in the false I will see any an unshipped lines, or any lines shipped in the last 2 years but I'm getting an error.

I think it's where I'm placing the 730 ( for 365 Days x 2) I've tried, wrapping in () in ' ' but neither is working can some pleae advise.

TIA,

Karl. 

 

Karl_Spratt_0-1646928217529.png

 

 

3 REPLIES 3
binuacs
21 - Polaris

@Karl_Spratt 

 

TODATETIME([actual_shipment_date]) <= DateTimeAdd(DateTimeNow(),-730,'days')

binuacs_0-1646928516058.png

 

AkimasaKajitani
17 - Castor
17 - Castor

Hi @Karl_Spratt 

 

In this case, You can also use DateTimeDiff function.

 

DateTimeDiff(ToDate([actual_shipment_date]),DateTimeToday(),'day')<=-730

 

To calculate the difference of days, you need to use DateTimeDiff function.

Karl_Spratt
8 - Asteroid

Thanks All the solution I used was, but thanks all for your help here..

TODATETIME([actual_shipment_date]) <= DateTimeAdd(DateTimeNow(),-730,'days')

 

Labels
Top Solution Authors