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!
Solved! Go to Solution.
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.
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.
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.
Hi @Sophie95
Here's a workflow that demonstrates what @Inactive User was referring to
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
Note that the percentages are displayed as decimals, since this the way they were read from the input file.
Dan
Thank you very much for your help Derekbelyea! I am still very new to the tool, just polishing up my first workflow.
User | Count |
---|---|
19 | |
15 | |
15 | |
8 | |
6 |