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

Using percentages with the Summarize Tool

automate
6 - Meteoroid

Hi everyone, I'm trying to take some old SPSS code and turn it into an alteryx workflow but I needed some help on how to deal with the percentages.

 

Im using the formula tool to create these percentages, I'm just not sure how I can use them correctly in the summarize tool.

 

My data looks something like this

Customer NumberMarket ShareQuote RateOther Rate
12345111
12345101

98765

010

98765

111

54321

100

 

Im using the summarize tool to group by customer number but I don't know how I can use it to correctly show the percentages.

 

Im still new to this so it might be an easy solution but if anyone can help Id really appreciate the help 🙂

3 REPLIES 3
grossal
15 - Aurora
15 - Aurora

Hi @automate,

 

could you provide a sample output? What percentages are you looking for?

 

Best

Alex

danilang
19 - Altair
19 - Altair

Hi @automate 

 

Here are two different ways that you can calculate the customer percentages for all 3 of your columns

 

w.png

Both use a pair of summarize tools to calculate the grand totals of all the items and the customer totals.  These are joined and then a formula tool calculates the percentage.  The top container assumes that you will only only ever have the three columns that you gave in your input.  The formula tool calculates one percentage for each column.  The bottom one is dynamic and will handle any number of columns.  First, transpose the values.  In the two summarize tools group by the name column as well as the columns from the top container. Join the outputs on Name and then build the ColumnLabel field as calculate the percentages.

 

The results for both methods are similar

danilang_0-1586862222451.png

 

Dan

automate
6 - Meteoroid

Thank you so much!! I tweaked this a little bit to accept the formulas I was trying to create and it worked amazingly!

Labels