Free Trial

Alteryx Designer Desktop Discussions

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

"Fiscal Year" field creation with dates and text in same column

Linders
6 - Meteoroid

Hello,

 

I'm working on creating a fiscal year field from the column below that contains dates and text (data type V_WString). I'm running into an issue when I use the below formula and am getting [Null]. Any suggestions on how I achieve a new "fiscal year" with the desired outcome below?

 

Formula I used returning [Null]

IF [Column 1] >= "02/01/2023" AND [Due to EY (SOX Input)] <= "01/31/2024" THEN "FY 2024"
ELSEIF [Due to EY (SOX Input)] >= "02/01/2024" AND [Due to EY (SOX Input)] <= "01/31/2025" THEN "FY 2025"
ELSE Null()
ENDIF

 

Column 1Desired Outcome "Fiscal Year"
WTnull
12/04/2023FY 2024
03/15/2023FY 2024
WTnull
02/15/2024FY 2025
11/26/2023FY 2024
11/26/2023FY 2024
Falsenull
02/19/2024FY 2025
WTFY 2024

 

Thank you in advance for your help!

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@Linders 
We need to convert your Date to dateTime format in order for comparing.

1215-Linders.png

Linders
6 - Meteoroid

Hi @Qiu, thank you for your help! I figured I had to somehow split it out, but was stuck on the execution. Fantastic use of REGEX and learned something new, appreciate it!

Qiu
21 - Polaris
21 - Polaris

glad to help. 😁

Labels
Top Solution Authors