The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
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

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
AncientPandaman
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