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

Determining the "new" year from a pre-determined date

ptopkis
6 - Meteoroid

For a project, I need to determine what year training was completed. However, the year starts on May 11th instead of on a quarter or year. 

 

In Excel it is simple as IF(Date_Completed>Date_Year_Started, Year_Started, "").  

Example: IF(2017-06-01>2017-05-11, 2017, ""). The dates could be the numeric version instead of the actual dates.

 

I tried using Formula to build the IF statement (using Alteryx IF statement) and kept getting malformed IF statement errors.

 

So any ideas on how to do this?

 

Thank you

 

 

 

2 REPLIES 2
nick_ceneviva
11 - Bolide

The Alteryx equivalent of the if statement that you use in Excel would be the following if your dates are formatted as DateTime

 

IF DateTimeDiff([Date_Completed], [Date_Year_Started],"days")>0 THEN [Year_Started] ELSE "" ENDIF

ptopkis
6 - Meteoroid

That work. Thanks!

Labels