Alteryx designer Discussions

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

Adding up Columns

Highlighted
Asteroid

Help! How do I add up column data and place totals  at the bottom of each column. I tried the summarize tool. My column data type is Int64. I attached a sample of my workflow data.

 

Thank you!

Highlighted
Inactive User
Not applicable

Summarise tool to get totals, then you need to add the dimensional plug values like Total Region, etc. into the appropriate columns using a formula tool. Then once it mimicks the original structure union it back on and place it in 2nd order in the union options.

Highlighted
Asteroid

Thank you, I am a bit lost. I have summarized by data already. I am not sure how to do the next step you recommended.

Highlighted
Inactive User
Not applicable

The formula step avoids having needless nulls in your data when you union the totals back on; you can use it to plug null values where the original data structure would have natural column values. Just put a union tool and connect both streams together to understand what I am conveying.

Alteryx Partner

 

 

Hi Sophie

 

This will get you close to the answer you are looking for:

 

 

 

Summarizing and SortingSummarizing and Sorting

Highlighted
Castor
Castor

Hi @Sophie95 

 

Here's a workflow that demonstrates what @Inactive User was referring to

 

WF.png

The top branch generates the grand total and appends it the existing dataset.  The bottom branch does the same with the subtotals, but uses a RecordID trick to get the subtotals in the correct place.  The Summarize tools gets the max record ID for each region and then adds .5 to this to ensure that the subtotal rows follow the corresponding regions.  These records are then appended the result of the top branch.  The 2 text inputs add in the table names. 

 

The solution is dynamic in that it will handle any number of sub-regions without having to explicitly specify them in separate filter tools.

 

The result are as follows

 

Results.png 

 

Note that the percentages are displayed as decimals, since this the way they were read from the input file.   

 

Dan

Highlighted
Asteroid

Thank you very much for your help Derekbelyea!  I am still very new to the tool, just polishing up my first workflow. 

Labels