This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!
HI,
I am struggling to calculate the Grand Total and Sub Totals for the table i have.]
Dept | Sub Dept | Sales | Cost | Mfg | Profit |
MKT | MKT _ US | 100 | 10 | 10 | 80 |
MKT | MKT_CAN | 200 | 100 | 15 | 75 |
Prod | Prod_US | 10 | 2 | 2 | 6 |
Prod | Prod_CAN | 50 | 2 | 2 | 44 |
I need a subtotal after each Dept , so one after MKT and one after Prod and than one final Grand Total. WHat would be easiest way to achieve this.
C
Solved! Go to Solution.
Hey @CarlMz! I would use a Summarize tool to GroupBy Dept then Summing the rest of the fields. Then, to add a Grand Total row, you could add another Summarize tool that is just the Sum of all of the summed fields. You can then use a Union to append it to your original data set. See the attached v11.0 workflow. Hope this helps!
You can use the summarize tool to find sub and grand totals in your data.
Flow:
Sub Total:
Grand Total:
Totally love how @BarnesK added the total rows to the table. It's a perfect format for document rendering
Flow:
Table:
Table Tool:
Table Styling:
Thank you all for the detail breakdown. I really appreciate your help and talking the time out to help me as i learn this amazing tool.
C
Hi @joshkushner can you please provide me Workflow? i tried the same way as in Screenshot but i couldnt able to get the desired result.