Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Subtotals

nausherc
6 - Meteoroid

Hi Experts, I have been struggling to use subtotals in my output. Is there a (simple) way to include subtotals in the output? Below is a sample data.

 

ClassSectionStudents
IA100
IB150
IIA200
IIB250
IIC300

 

I would like to have subtotals for each class like the ones we see in pivot tables. I tried the CReW macros(Add Totals), but it totals the full range and not by each group. My workflow goes - Many tools to Union-Summarise-Table-Layout-Render.

 

Thanks!

9 REPLIES 9
Kenda
16 - Nebula
16 - Nebula

Hey @nausherc!

 

Have you tried the Running Total tool and grouping by your Class field?

nausherc
6 - Meteoroid

Hi BarnesK, 

 

Yes, I tried that as well. But the totals are continuous and calculated at columns, while I am looking to use rows.

Kenda
16 - Nebula
16 - Nebula

@nausherc Can you post an example of what you want your sample output to look like, please?

Kenda
16 - Nebula
16 - Nebula

Hey @nausherc 


Check out this workflow to see if it is what you're looking for.

 

nausherc.PNG

nausherc
6 - Meteoroid

This is how the output should look.

 

1.JPG

While, I found a workaround of Union-ing 2 different summaries (one with all fields and the other with only the grouping field) and then ->sort -table-layout render, I feel its not efficient.

Kenda
16 - Nebula
16 - Nebula

@nausherc The first workflow I attached did not have a grand total row, so I have attached an updated workflow that contains all the subtotals and the grand total. 

 

Is this what you're looking for?

 

nausherc2.PNG

nausherc
6 - Meteoroid

Hi BarnesK, Yes, both the workflow you provided is close to what I am trying to achieve. I 'll try it in my workflow and report back later today. Thanks for the help!

nausherc
6 - Meteoroid

That worked, Thanks :)

ARAVIND1
5 - Atom

Hey,
I am finding trouble in comparing total, Main account will have Account ID and balance, however sub account will have just the totals, please suggest a solution to compare the numbers, 

the catch is sub account will not have account ID at the total, rather it will have at the start (see 9 and 16). Similarly, subtotal will run to multiple batches

for example,

 

RowTypeAccountDetailsT4-2018Query
1S100000000Total Assets  
2D110000000Liabilities10075267.67Please compare the amount to total in Row 14
3D130000000Intangibles0Please compare the amount to total in Row 20
4D150000000Assets0 
5D170000000Engagement0 
6D190000000Other Assets195876.01 
7T  10271143.68 
8Spacer    
9S110000000Liabilities  
10D112000000Cash0 
11D114000000Deposits9651525.11 
12D115000000Suspense0 
13D116000000Cheque423742.56 
14T  10075267.67 
15Spacer    
16S130000000VALEUR MOBILIERE  
17D132000000EMISE OU GARANTIE PAR CANADA0 
18D135000000EMISE OU GAR.-PROV. ET MUN.0 
19D137000000AUTRE VALEUR MOBILIERE0 
20T  0 
Labels