In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
Start Free Trial

Alteryx Designer Desktop Discussions

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

DateTimeYear added to text

RoliveIndeed
6 - Meteoroid

I know there's a simple solution to this, but after searching for more than 10 mins I decided to just ask.

 

I'm trying to create FY and Qtr columns based on a date. 

 

For FY - I'm trying to say if the date is April 1st or greater, then "FY " + DateTimeYear([Date]), else "FY " + (DateTimeYear([Date]) -1)

 

For Qtr - I want to basically say if DateTimeYear([date]) < 4 Then "FY " + (DateTimeYear([Date]) -1) + " - Q4" and so on...

 

I'm gonna kick myself once someone gives me the answer, so thank you all in advance! 

1 REPLY 1
PangHC
13 - Pulsar
if DateTimeMonth([date]) >= 4 then
  "FY-"+tostring(DateTimeYear([date]))
else
  "FY-"+tostring(DateTimeYear([date])-1)
endif

 

[FY]+
"-Q"+tostring(CEIL(DateTimeMonth([date])/4))

 

PangHC_0-1763008670510.png

PangHC_1-1763008715081.png

 

Labels
Top Solution Authors