Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

adding a sum value at the end of a column

TonyMu
8 - Asteroid

Hello Guys, 

 

is there a function in Alteryx which adds a sum value to the end of each chosen column? something like autosum in excel. 

 

Cheers

 

 

10 REPLIES 10
Emil_Kos
17 - Castor
17 - Castor

Hi,

 

I don't have access Alteryx but you can check those two posts:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Summing-data-from-Multiple-columns-int...

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/New-Total-Column-sum-of-values-across-...

 

In the first one, you will find also working workflow that should guide you on how to do it. 

 

In short, alteryx don't have straight build sum of columns functionality. 

 

If this was helpful please mark my post as a solution. 

 

 

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@TonyMu ,

 

 there's a CReW macro for you!  Add Totals

 

 you can find it http://www.chaosreignswithin.com/p/macros.html?m=1  

 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
atcodedog05
22 - Nova
22 - Nova

Hi @TonyMu 

 

Here is a generic approach.

Output:

atcodedog05_2-1606587210744.png

 

Workflow:

atcodedog05_1-1606586626931.png

Step-1: using recordID tool set up a Id column

Step-2: using transpose, only select columns that needs to be added up as data columns and rest all as key columns

atcodedog05_2-1606586672170.png

Step-3: using crosstab, set the recordID and other columns (columns which was not selected as data in transpose) set name as header and value as value. And select aggregation as avg, total row, total column.

atcodedog05_0-1606586822473.pngatcodedog05_1-1606586836708.png

Step-4: using formula tool, to set the last row recordID as text Total

 

Hope this helps 🙂 Feel to ask if you have any questions

TonyMu
8 - Asteroid

Thanks, This will make a sum value for each existing column, Is there a way to apply this to specific columns only? 

for example if I want to have a sum value on my last 2 columns only and not on 10 other columns before it

Emil_Kos
17 - Castor
17 - Castor

Hi @TonyMu,

 

in this case you need to use formula function and use formula similar to the one below

 

[column1]+[column2]

TonyMu
8 - Asteroid

Hello 

 

 

Name time Code value 2value 3orderprio
FSIKJ2020.12.02X1125131
olkijn2020.12.03B537163
   1512  

atcodedog05
22 - Nova
22 - Nova

Hi @TonyMu 

 

My previous workflow could also be modified for this task.

 

But here is a much simple workflow for the task.

 

Output:

atcodedog05_0-1606647068570.png

Workflow:

atcodedog05_1-1606647086296.png

In the summarize tool add the column on sum. To get total for that column. And rename it same as column name.

atcodedog05_2-1606647106720.png

 

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

 

atcodedog05
22 - Nova
22 - Nova

Hi @TonyMu 

 

Just posted a response similar to your requirement🙂 

atcodedog05
22 - Nova
22 - Nova

Hi @TonyMu 

 

Here the same workflow using your data.

 

Input:

atcodedog05_1-1606647408967.png

Output:

atcodedog05_0-1606647389104.png

Workflow:

atcodedog05_2-1606647434351.png

Hope this helps 🙂 Feel to ask if you have any questions

Labels