Alteryx Designer Discussions

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

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!

How to sum certain columns without affecting other?

akilbour
5 - Atom

The first section is the two rows that I am starting with. I would like to sum the bolded columns (quantity, lbs, level) but keep the rest of the information that same so it reads as the second section. What tool would you suggest to achieve this output?

akilbour_0-1610565736082.png

 

messi007
12 - Quasar

@akilbour 

Please see below:

 

messi007_0-1610566391852.png

Attached the workflow,

 

Hope that helps,

 

Regards,

AngelosPachis
14 - Magnetar

Hi @akilbour ,

 

You can achieve that with the summarize tool. The documentation for the tool can be found below:

 

https://help.alteryx.com/current/designer/summarize-tool

 

Essentially you have to group by all the fields that are common between the two rows (Name,F8, FileName, New Field)  that are non-numeric (apart from RecordID) and then sum all the numeric fields(quantity, gal, level).

clmc9601
11 - Bolide

Here's a screenshot of what the above would look like:

Screen Shot 2021-01-13 at 12.30.24 PM.png

 

It will work as long as the values in the "group by" fields are consistent. Any differences will create a new row.

vizAlter
12 - Quasar

Hi @akilbour - Try this solution:

vizAlter_0-1610566995383.png

 

And, notice the configuration window for the Summarize tool:

vizAlter_0-1610567074724.png

 

akilbour
5 - Atom

Thank you @clmc9601 for the screenshot! I tried to use the summarize tool but for some reason, it will not let me select sum for the quantity, gal, and lb field. Do I need to change them from a V_wstring maybe?

AngelosPachis
14 - Magnetar

Yes, that is correct @akilbour ,

 

You are only allowed to apply the sum operator on numeric fields only. So changing them to a Double or an Int if they are all integers will allow you to use the sum function.

Labels