In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Sum columns by code

AG21
5 - Atom

Hi - newbie question I couldn't find an answer for. I have a sheet structured like below. 

 

Both columns and rows will increase over time. I can't find an elegant way to group and sum by column heading which also allows for dynamic rows/columns. 

 

AG21_0-1605227861029.png

 

3 REPLIES 3
PhilipMannering
16 - Nebula
16 - Nebula

Hi @AG21 

 

This might work,

PhilipMannering_0-1605232313096.png

 

Alteryx won't let you have more than one field name the same. So it appends a number. So I pivot the data > chop off that digit from the field name and sum it up. (You might need to replace \d$ with \d+$ if you have more than 9 fields named the same!)

AG21
5 - Atom

Hi Philip, 

 

Thank you for the reply.. I'm not getting the expected results with the suggested workflow. 

 

Any other suggestions? Thoughts on how to adjust the data structure? I could pre-aggregate columns in excel with a simple sumif formula but prefer to keep contained in the flow. 

 

-Anthony 

atcodedog05
22 - Nova
22 - Nova

Hi @AG21 

 

Can you share the sample data in excel.

Labels
Top Solution Authors