Alteryx Designer Desktop Discussions

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

Using a sum of a column in a formula

ahsankhalid
8 - Asteroid

Hi Community, 

 

I am trying to use the sum of a column to create a new column in a workflow. Please can you share some ideas. 

 

e.g. for record ID 1, the calclulation for the new column will be 35*(192/0). 

 

this is test data and the real one will have very less 0s. 

 

PRP.png

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@ahsankhalid ,

 

Almost as you wrote it:

 

  1. SUMMARIZE and get the SUM_SCP value
  2. APPEND FIELDS to put the SUM_SCP onto your data
  3. FORMULA to calculate the new column

I don't know about dividing by zero however.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Kenda
16 - Nebula
16 - Nebula

Hey @ahsankhalid!

 

The key here would be to use a Summarize tool to sum your SCP field then use an Append Fields tool to add that totals column back to each record from your input. From there, just use your new totals field in your calculation to create your new field.

 

Hope this helps!

 

Capture.PNG

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Kenda did an excellent job of drawing a VERTICAL picture of my solution.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
snellingjhn
5 - Atom

Great! Exactly what I was searching for. I didn't realize that I needed to use the Append tool. I would still prefer to have simple functions like count distinct and sum built into the formula tool. 

Labels