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.
SOLVED

Filter using Weighted Average

Jingwei
6 - Meteoroid

Hi,

 

I have calculated the weighted average of a data set and would now like to use this weighted average number as a filter. 

e.g. step 1: find national weighted average employment growth for all metro areas with the US

step 2: filter metro areas with employment growth that is above the national weight average

 

I'm stuck on step 2 as weighted average does not become become a new variable that I can manipulate... it's a single output? Help!

 

I think there should be an easy solution but can't seem find it online, thanks in advance for your help!!

12 REPLIES 12
Hakimipous
10 - Fireball

Hey @Jingwei 

 

Could you specify of you get your weighted average in step 1 ? could help to understand better

Jingwei
6 - Meteoroid

I'm just using the Weighted Average tool in the Transform Tool Palette.

Thanks.

Hakimipous
10 - Fireball

Here in the workflow I did something to filter out what's greater than the Weighted Average

 

Let me know if that's help

Hakimipous
10 - Fireball

Or once you get you value, you can just filter the field using a Filter Tool

 

should have the expression looking like  [Field] > YourValue

Jingwei
6 - Meteoroid

Hi Hakimipous,

I have at least 12 variables, of which I need to get weighted average by national, by state and by county. I will be filtering at least 36 times.

Is there a more dynamic way of filtering using the calculated weight average (e.g. by turning it into a usable field) – instead of hard-coding the value in the each filter?

Thanks.

 

Hakimipous
10 - Fireball

could you post your Dataset ?  or an example 

Jingwei
6 - Meteoroid

I can't share the data but here's a pic of my workflow.

I'm stuck after calculating weighted average (not sure how to filter using their values without manual input)

 

 

snap alt.png

ckorte
6 - Meteoroid

Use an Append tool.  Connect the Weighted Average tool to the "S" input and your Formula tool to the "T" input.  Do this for all your Weighted Average tools, then you will have your full data set with the calculations.

Hakimipous
10 - Fireball

Yup, you won't need that much Filter Tool (again if I understood correctly)

 

Use the Append tool ( a bit similar to what I did with the Formula tool)

Labels