ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

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

Add additional rows for sum amount

anhdo92
7 - Meteor

Hi

 

I am looking to add additional rows that show the sum amount by shortnames.

 

Input (file attached)

 

anhdo92_0-1620178785013.png

 

For each shortname that shares the same Code, I would like to add an additional row right below to show the sum amount of Volume and Amount.

From there, I would like the workflow to be able to generate separate output files based on shortnames following the format below:


Output file 1:

anhdo92_3-1620179010338.png

 

Output file 2:

anhdo92_4-1620179040260.png


Any help is much appreciated!

 

apathetichell
13 - Pulsar

Hi!

 

do you need the fruit/code subtotals as records or can they be columns in the related records? I know in excel it makes more sense to put the subtotals underneath but in Alteryx, we keep them with their respective records (unless it's a table/report structure).

anhdo92
7 - Meteor

Hi @apathetichell  thank you for your help. 

Yes I do need to put the subtotals underneath so that the output follows a report structure in my previous screenshots. 

Any ideas ? 🙂

apathetichell
13 - Pulsar

This version has the totals added back to the source as new rows with "total" in the shortname field and the codes/sum volumes/sum amounts below.

 

Corrected version - sum volume/sum amount were aligned incorrectly in the Union in the original.

Qiu
17 - Castor

@anhdo92 

Made some further improvement to @apathetichell work.

Add the blank row and also the output option.

Capture4A.PNG

anhdo92
7 - Meteor

@apathetichell @Qiu 
Awesome. Thanks both! I managed to find a workaround but your suggestions help simplify my workflow a lot!
Thanks again

Qiu
17 - Castor

@anhdo92 
Happy to help and thank you for the accept mark. 😁

Labels