ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Average two numbers from separate columns

nwatzlaf
アステロイド

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件の返信5
Maskell_Rascal
パルサー

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
アステロイド

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
クエーサー

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

 

 

Greg_Murray
クエーサー

@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
パルサー

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

ラベル
トップのソリューション投稿者