alteryx Community

Alteryx Designer Discussions

SOLVED

How to find Subtotal and Grand total

6 - Meteoroid

Hi,

I've my data like below where i need to find Subtotal for each Name column and then finally grand total of all.

Ex- US total is having subtotal of Name=US for each VAR and ABS VAR column. Like wise we need to find EMEA total and APAC total.

One more thing is that some records are empty under Name. Like in APAC we have 4 ID's but APAC coming only once in column Name. Like a normal excel pivot table.

How to achieve this in alteryx?

I've taken only 3 values in Name column

 Name ID VAR ABS VAR US 213 213 US total 213 213 APAC 123 1009 3535 345 313 233 567 35 1313 765 35 23 APAC Total 1392 5104 EMEA 122 539 897 313 121 12 343 23 EMEA total 778 683 Grand total 2383 6000
8 REPLIES 8
8 - Asteroid

Have you tried the method employed in this post? Pivot Table Display as Grand Total

9 - Comet

Here's my solution.  The names are coming out in alphabetical order, there will be a little more work if you need to maintain the incoming order.

Alteryx

@Chris86  - What's the best way to be able to place the subtotals where you want in the list.  (see screen shot)

11 - Bolide

Displayed two ways may be it can help..

6 - Meteoroid

Exactly. how to place the total in appropriate position and keep ID column also?

Like below

 Name ID VAR ABS VAR US 213 213 US total 213 213 APAC 123 1009 3535 345 313 233 567 35 1313 765 35 23 APAC Total 1392 5104 EMEA 122 539 897 313 121 12 343 23 EMEA total 778 683 Grand total 2383 6000
9 - Comet

@Pandey19 This is the output from my solution above, with subtotals placed after groups and grand total at the end.  Currently in alphabetical order of names but that could be fixed in a few extra steps.

11 - Bolide

Is this output is not ok for you?

11 - Bolide

Hi @Pandey19 ,

If you are ok the solution then please mark it as a solution.

Labels