Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Data Conversion

Mruhullah
6 - Meteoroid

Hi Folks, 

 

I am new to this. I have two user defined field [Created_Year] (int32) and [Created_Month] (Int32) and my objective is to get the quarter based on below logic. 

 

if [Created_Month] >= 1 and [Created_Month] <= 3
then ToString([Created_Year],0) && 'Q2'
elseif [Created_Month] >= 4 and [Created_Month] <= 6
then tostring([Created_Year],0) && 'Q3'
elseif [Created_Month] >= 7 and [Created_Month] <= 9 then tostring([Created_Year],0) && 'Q4'
else tostring([Created_Year]+1,0) && 'Q1'
endif

 

I am looking to get the result like this

12/12/2016 should give me 2017Q1

 

Can anyone help me on this. By applying above formula i am getting result as "0"

 

2 REPLIES 2
GavinAttard
11 - Bolide

Hi

 

Replace the && with + 

 

here is the formula: 

 

if [Created_Month] >= 1 and [Created_Month] <= 3
then ToString([Created_Year],0) + 'Q2'
elseif [Created_Month] >= 4 and [Created_Month] <= 6
then tostring([Created_Year],0) + 'Q3'
elseif [Created_Month] >= 7 and [Created_Month] <= 9 then tostring([Created_Year],0) + 'Q4'
else tostring([Created_Year]+1,0) + 'Q1'
endif

 

ciao

 

G

Alteryx Everything, Leave no one behind.
Mruhullah
6 - Meteoroid

Thanks and appreciated  :) 

Labels
Top Solution Authors