Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

What's a good approach for summarizing data calculated in different columns?

gumbatman
8 - Asteroid

 

Hello,

 

I have a little experience with Alteryx, but I cannot figure out the best approach for this problem.  

 

Here is an example of the already summarized data:

 

YearAreaLevelHeadcountReceived Bonus
2010EastManagers275
2010NorthManagers183
2010SouthManagers304
2010WestManagers184
2011EastManagers176
2011NorthManagers2110
2011SouthManagers1910
2011WestManagers161
2012EastManagers2611
2012NorthManagers199
2012SouthManagers219
2012WestManagers306
2010EastEmployees258
2010NorthEmployees2311
2010SouthEmployees179
2010WestEmployees303
2011EastEmployees245
2011NorthEmployees302
2011SouthEmployees151
2011WestEmployees275
2012EastEmployees3012
2012NorthEmployees224
2012SouthEmployees2611
2012WestEmployees282

 

What I would like to do is display the data in this format, including adding calculations for the percents:

 

 Employees HeadcountEmployee Received BonusEmployee Bonus PctManager HeadcountManager Received BonusManager Bonus Pct
2010      
East25832.0%27518.5%
North231147.8%18316.7%
South17952.9%30413.3%
West30310.0%18422.2%
2011      
East24520.8%17635.3%
North3026.7%211047.6%
South1516.7%191052.6%
West27518.5%1616.3%
2012      
East301240.0%261142.3%
North22418.2%19947.4%
South261142.3%21942.9%
West2827.1%30620.0%


I can kinda half do this with the Cross-tab tool, but I can't seem to recombine (Join tool?) them is a way that makes sense. This is obviously just sample data, the data I have has two additional columns that groups/splits the data further.

 

Thank you for the help.

4 REPLIES 4
RolandSchubert
16 - Nebula
16 - Nebula

Hi,

 

I think, using two Cross Tab tools should solve the problem. See attached workflow, maybe you can use this approach.

estherb47
15 - Aurora
15 - Aurora

Hi @gumbatman 

 

I like @RolandSchubert 's approach, using 2 cross tabs and a join.

 

Another way to do this is with Transpose, Cross tab, and Formula tools.

 

image.png

Here, the transpose drops the Headcount & Received Bonus into rows, and a formula tool combines that with the text in Level. A crosstab builds the result you want. Some cleaning up with dynamic rename, calculate percentages, and then reorder with a select tool.

If you want the output to appear with the decimal, use this formula in the second formula tool, and be sure to set the data type as string: tostring([Employees Received Bonus]/[Employees Headcount] * 100)+"%"  Repeat for manager.

 

Cheers!

Esther

 

 

gumbatman
8 - Asteroid

Esther,

 

Thank you for taking the time to respond. This worked perfectly for me!

gumbatman
8 - Asteroid

Roland,

 

I really appreciate the great answer. Thank you so much!

Labels