In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

IF Formula with Date condition

RanjanKT
8 - Asteroid

Hi,

 

Can some one help me correcting the below formula.

 

For some reason i am getting the out put only

Closed

Pastdue

>90

 

if [Stage]="Closed" then "Closed" elseif [AnticipatedWinDate]<"28-06-2019" then "Pastdue" elseif [AnticipatedWinDate]<=DateTimeAdd("2019-06-28",+30,"days") then "0-30" elseif [AnticipatedWinDate]<=DateTimeAdd("2019-06-28",+60,"days") then "31-60" elseif [AnticipatedWinDate]<=DateTimeAdd("2019-06-28",+90,"days") then "61-90" else ">90"
Endif

 

The date is in the below format

clipboard_image_0.png

1 REPLY 1
Thableaus
17 - Castor
17 - Castor
Hi,

Your First clause has a date out of date format. Correct the Format to yyyy-mm-dd

if [Stage]="Closed" then "Closed" elseif [AnticipatedWinDate]<"2019-06-28" then "Pastdue" elseif [AnticipatedWinDate]<=DateTimeAdd("2019-06-28",+30,"days") then "0-30" elseif [AnticipatedWinDate]<=DateTimeAdd("2019-06-28",+60,"days") then "31-60" elseif [AnticipatedWinDate]<=DateTimeAdd("2019-06-28",+90,"days") then "61-90" else ">90"
Endif
Labels
Top Solution Authors