Alteryx Designer Desktop Discussions

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

How to change quarters (Q1, Q2...) into periods (P01, P02...)

maxtla
8 - Asteroid

Hello,

 

I have my all data source in quarters (Q1,Q2,Q3 and Q4) and now need it in periods (P01, P02,P03, etc) ...need to create a formula, but I have no idea how to create it.

 

many thanks.

 

Monica

8 REPLIES 8
phottovy
13 - Pulsar
13 - Pulsar

Hi @maxtla ,

 

Do all the periods line up with the quarter label? For example Q4 = P04? If so, the easiest way would be a replace function to replace the letter 'Q' with 'P0':

Replace([Quarter], 'Q', 'P0')

 

phottovy_1-1654187428002.png

 

 

phottovy_0-1654187411913.png

 

sbatra116
8 - Asteroid

@maxtla

 

Place formula tool 

use the above formula mentioned by @phottovy

maxtla
8 - Asteroid

Hi,

thanks for your answer, but is not helping really, cause the Q2 is not the period 2, should be P04, P05 and P06....for Q3 should be P07, P08, P09. For Q4 should be P10, P11, P12. For Q1 is P01, P02 and P03.

The point is that I have to add 3 rows to each Quartal....so the same data for Q1 should be for P01 and copy it for P02 and for P03.

 

Still trying to figure that.

 

any ideas?

 

thanks

 

Monica

grazitti_sapna
17 - Castor

Hi @maxtla 

How about you use formula tool, map the date period and convert the date periods to months in numeral form and add 'P' string as prefix.

One query - do you have date periods or date period is itself a string as Q1, Q2, etc. Let me know if there is any success/challenges.

Thank You.

Sapna Gupta
maxtla
8 - Asteroid

Hi,

 

I do not have periods...the only time point that I have in the data source are quarters (Q1, Q2, Q3 and Q4) that is why I need to create the periods-months. 

For Q1 I need to create 3 periods (P01, P02 and P03)...that is why I donot know how to do it....

 

any suggestions will be more than welcome!

 

Monica

grazitti_sapna
17 - Castor

@maxtla, you can try this by creating a data mapping for Quarters, please refer to the screenshot below and the workflow attached.

grazitti_sapna_0-1654608311175.png

 

 

Thanks!

 

Sapna Gupta
FilipR
11 - Bolide

You can use my simple Python tool for generating quarters and months from the indicated quarter. Then you can rename them to whatever format you need.

maxtla
8 - Asteroid

ahhhh now I understand...and is working !!!

Many Thanks !!!!

Labels