Alteryx Designer Desktop Discussions

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

Dynamic Header

hemant86
11 - Bolide

Hi All,

 

I have input in the below format. Now since this is a quarterly process, My headers will keep changing according to months in the quarter as shown below.

Input for Q1  
MarAprMay
200300400

Output required:

MarAprMaySum
200300400900

 

 

Now in the second quarter the headers will change as shown below. How do I do this dynamically using formula tool or any other tools available. Hope I'm clear with the requirement. Appreciate any help.

 

Input for Q2  
JunJulAug
600700800

 

5 REPLIES 5
JosephSerpis
17 - Castor
17 - Castor

Hi @hemant86 one approach would be to pivot your data and then sum up the values. I have attached an example of that approach.

 

Sum23112021.JPG

mbarone
16 - Nebula
16 - Nebula

You can flip the data vertically using a Transpose Tool , do your sum with a Summarize Tool , then flip it back to horizontal with a Crosstab Tool .  The links are to the Tool Mastery Index , which is a great resource to learn tools.  Also, in Alteryx itself, if you click the icons for the tool in the top palate, you'll see "Open Example" that you can click for each tool as well:

2021-11-23 12_39_26-Alteryx Designer x64 - New Workflow2_.png

Play around with it and let us know if you have any trouble or need further assistance.

hemant86
11 - Bolide

Thanks @JosephSerpis . Sorry I was not clear enough with my requirement. The requirement is as below

Input Q1

EmpidMarAprMay
1200300400
2100200500
3600100200

 

Output

EmpidMarAprMayTotal
1200300400900
2100200500800
3600100200900

So the total will be calculated for each employee

 

Input Q2

EmpidJunJulAug
1200300400
2100200500
3600100200

 

Output

EmpidJunJulAugTotal
1200300400900
2100200500800
3600100200900

Note: Headers are changing

 

Is there a way I can do this in the same workflow other than giving the user 4 different workflows for 4 quarters or radio buttons to chose the workflow?

JosephSerpis
17 - Castor
17 - Castor

Hi @hemant86 you can still use the same concept of pivioting your data. I made some changes like using the Empid as a unique ID when I pivot and sum up the total and then eventually join the data back together.

hemant86
11 - Bolide

Thanks @JosephSerpis . That worked great for me🙂

Labels