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.

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

 

6 REPLIES 6
messi007
15 - Aurora
15 - Aurora

@akilbour 

Please see below:

 

messi007_0-1610566391852.png

Attached the workflow,

 

Hope that helps,

 

Regards,

AngelosPachis
16 - Nebula

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
13 - Pulsar
13 - Pulsar

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
16 - Nebula

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