Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!

Alteryx Designer Desktop Discussions

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

Need Formula Help

elizabethpg
5 - Atom

elizabethpg_1-1686760639801.png

 

 

Could someone please help me with how to set up a formula? I want to calculate what percentage each unique location code is of the total when the company code and state code match. For example, on the first 3 lines the company code of 12 and state code of 1 match and equal $113. Location code 31 would be 23/113, location code 32 would be 25/113, etc. for each combo of company code and state code. Hopefully I explained that properly. Let me know if I can clarify anything and thanks in advance for your help!

2 REPLIES 2
ChrisTX
16 - Nebula
16 - Nebula

Use a Summarize tool.  Group by Company Code and State Code, Sum on Amount

 

Then a Join tool to add the field for [Sum on Amount] back to the original data stream (before the Summarize tool).  Join on Company code and State Code.

 

Then a Formula tool to calculate Percent of Total:  ([Amount] / [Sum of Amount]) * 100.  Use an output data type of Fixed Decimal.

 

Chris

nagakavyasri
12 - Quasar

Screenshot 2023-06-14 133557.png

Labels
Top Solution Authors