Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Sum and grouping of data

Belletmns
8 - Asteroid

Hi Team,

 

I need  your help, I'm struggling with grouping my data based on certain conditions. I would like to achieve the pivot functionality in excel.

 

Here is my sample data:

 

CompanyEE #EE employment StatusC Status
Company 1EE1ActiveClosed
Company 1EE2TerminatedLive
Company 2EE3ActiveClosed
Company 2EE4ActiveLive
Company 3EE5TerminatedClosed

 

Here is my preferred output:

 

 

 ActiveTerminatedGrand Total
Row LabelsClosedLiveClosedLive 
Company 11  12
Company 211  2
Company 3  1 1
Grand Total21115

 

Thanks in Advance!

 

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @Belletmns 

 

This is how you can do it.

 

Workflow:

atcodedog05_0-1623051708381.png

1. Using formula tool i generating column label contacting [EE employment Status] [C Status]. Creating a variable count = 1 which will be used for sum of count.

2. Using crosstab tool key as Company, Name as label, Value as count and aggregation method as Sum, Total row & Total Column.

3. Using dynamic rename to rename the columns 

 

Hope this helps 🙂

Belletmns
8 - Asteroid

Thank you @atcodedog05 Cheers! 🍻

Belletmns
8 - Asteroid

Hi @atcodedog05 ,

 

Need your help please, I need to add the year below Company Name. What steps should I add?

 

My data:

CompanyYearEE #EE employment StatusC Status
Company 12016EE1ActiveClosed
Company 12017EE2TerminatedLive
Company 22020EE3ActiveClosed
Company 22021EE4ActiveLive
Company 32022EE5TerminatedClosed

 

My Desired Output:

 

Row LabelsActive - ClosedActive - LiveTerminated - ClosedTerminated - LiveGrand Total
Company 11  12
20161    
2017     
Company 211  2
20201    
2021 1   
Company 3  1 1
2022 1   
Grand Total21115

 

Thank you! 🙂

Labels