Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Average two numbers from separate columns

nwatzlaf
8 - Asteroid

I want to average two numbers from separate columns to create a new final rank column. I'm sure there is an easy way to do this but I can't come up with it for some reason. See sample data below

 

Miles       Volume         Final Rank

100           1,200             650

50              500               275

600            75                 337.5

 

 

I am also wondering if I can use a weighted average to weight miles more heavily (70%) than volume (30%).

 

Any assistance is greatly appreciated. 

 

Thanks!

5 REPLIES 5
Maskell_Rascal
13 - Pulsar

Hi @nwatzlaf 

 

You can use the formula: Average([Miles],[Volume])

 

To get to a weighted average, you can add in a calculation to to the above formula. Something like the below:

 

Maskell_Rascal_0-1603913209789.png

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Thanks!

Phil

nwatzlaf
8 - Asteroid

Hi @Maskell_Rascal ,

 

Thank you!! I think I just made a syntax error. I did not know the comma was the separator.

 

Thanks again!!

vizAlter
12 - Quasar

@nwatzlaf —  Suggest you to keep the same data type for the numeric fields.

 

 

Greg_Murray
12 - Quasar

@nwatzlaf 

 

You want to use this for weighted average. The formula in the solution doesn't look like it's correct. You don't need to average after you apply the weights, just add the results together.

 

 

 

 

[miles] * .7 + [volume] *.3

 

 

 

 

Maskell_Rascal
13 - Pulsar

@Greg_Murray is correct. My head was thinking in terms of weighted indexes.

Labels