Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Method to sum identical column values and then figure out percentage breakdown within col?

greenv1nes
6 - Meteoroid

Hello all!

 

Working on a project that requires me to determine for all the states that exist in the dataframe, what is the percentage breakdown of the States.

 

I've attached sample data. Is there some way that Alteryx would be able to output that TX = 20%, MI = 30%, OH = 10%, and CA = 40%?

 

Thank you so much!

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @greenv1nes 

 

Here is how you do it

 

Workflow:

atcodedog05_0-1625754054418.png

1. Using summarize groupby state and get count for each state

2. Using summarize get total count.

3. Using append tool add total to the state count data.

4. Using formula calculate %.

 

Hope this helps 🙂

Luke_C
17 - Castor
17 - Castor

Hi @greenv1nes 

 

Here's an example, you can use the summarize tool to count the records for each state, and then a count records tool to get the total # of records. From there you can append the total to the data set and do the formula to determine the % for each state.

 

Let me know if this helps.

 

Luke_C_0-1625754109182.png

 

greenv1nes
6 - Meteoroid

Thank you so much!

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @greenv1nes 

greenv1nes
6 - Meteoroid

 Thanks so much, Luke!

Labels