Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

formula and date sorting

Miki2021
8 - Asteroid

Dear Alteryx community,

 

Any chance to take your brain:

 

Task

I am consolidating YTD sales data from January to September. I have launched a new product from March 24 onwards so I'd like to create a simple formula to sort out those sales records after product launch.

 

My simple formula is: iif([Order Date (Header)]>"24-03-2021","yes","no"). However, this seems to be not working. I make sure that the original data type of the sales order date is a date not a string. Wonder what mistake I have made...thanks a bunch!

 

Miki2021_0-1633354000607.png

 

cheers,

Miki

 

 

 

3 REPLIES 3
FlorianC
Alteryx
Alteryx

Hi @Miki2021,

 

If you are comparing dates, make sure to use the ISO 8601 date format ("YYYY-MM-DD"). Moreover, I would recommend to use the DateTimeDiff() function to identify the time difference.

 

Working formulaWorking formula

 

Please find attached a working example.

Florian Carrier
Strategic Solution Consultant
Alteryx
messi007
15 - Aurora
15 - Aurora

@Miki2021,

 

Try to change the formula like this :

 

iif ([Order Date]>"2021-03-24","yes","No")

 

Best regards,

 

shreyanshrathod
11 - Bolide

Alteryx default date pattern is "yyyy-mm-dd".

 

Try "2021-03-24".

 

Regards,

Shreyansh

Labels