Start Free Trial

Alteryx Designer Desktop Discussions

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

Grouping and Sum

Kishorec
5 - Atom

Hi, Have data from excel column B, "code", column C "code2", and amount in column D.
where Code 2 has various codes which should be group by and get the sum of desired 'Code' from column C.

for example: in Column C, one of the code is 11005, I need sum of only those code from column B corresponding to 11005 say the sum of 1000+1021+1035+1036 under 11005 to be summed up and so on with other codes. 

Can someone help me what is the right tool/formula to use this in Alteryx designer desktop (2025.1 version) 

 

attached the excel file for reference. 

4 REPLIES 4
jrlindem
12 - Quasar

@Kishorec 

If i'm interpreting your need correctly, you just need to use the SUMMARIZE tool.  Group by [Code2] and use the SUM Action on the [Spend] field.  Your input file also starts on Row 3, so make sure you specify that in the INPUT tool and deselect "First Row Contains Data"

Is this what you're after:

 

jrlindem_0-1761834529284.png

 

Kishorec
5 - Atom

@jrlindem

As a further step, I would need sum of only 1000,1021,1035 & 1036 from column B, which all falls under '11005' from column C.

thanks for your reply, and I have updated my Excel for data that start from row 3.  Below image sample of expected result into my excel

Kishorec_0-1761835424987.png

 

jrlindem
12 - Quasar

No worries @Kishorec  just need to push the workflow a little further.  I did this "long form" meaning I didn't go for as few tools as possible so you could see and follow the steps more easily.  You should be able to adapt as needed.

 

Also, in order for your aggregation to know what needs to be grouped together for the [code] field I added another input which is the assignment of the [code] fields.  You'll have to figure out how you want to handle that when you scale up, but this does get you there:

jrlindem_0-1761848650209.png

 

Kishorec
5 - Atom

Thank you @jrlindem. 

Labels
Top Solution Authors