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

Z-Score Workflow Problem

ddavis216
6 - Meteoroid

Hi:

 

I am working with a number of population variables for a Census level Block Group analysis and I am struggling with the Z-Score calculation.

 

From my table of rows by Block Group, I dragged the Summarize Tool down and ran the Average (Mean) and Std. Deviation for each variable (not grouped by anything), but I don't know where to go from this point in order to convert them to a Z-Score. I have all my formula tools set up but I don't know what the approach to get the two Summarize tools reconnected to the original data table for calculation. The screenshot essentially show the gap in my workflow. I knew I was doing something wrong when my Z-Score were not providing any negative values.

 

Can someone please help point me in the right direction?

 

Thanks,
Donny

4 REPLIES 4
RafaelH
Alteryx Alumni (Retired)

From your Summarize tools I would bring in two Append Fields tools to append the calculated sigmas and means, your target inputs, to each source observation. You will need to configure both Append Fields tools to "Allow All Appends" in the drop down selection below to allow for more than 16 records to pass through.

 

After that, I would use a Formula Tool to create the (source - mean) / sigma column for each source field, to get your scaled fields.

 

Hope this helps.

MarqueeCrew
20 - Arcturus
20 - Arcturus

@RafaelH,

 

While @ddavis216 was writing his reply, I was creating a macro to calculate the Z-Score.  I did not write the table lookup, but thought that I'd give you a finished macro that will compute the score on your behalf.  

 

Capture.png

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

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

This works well. The only issue is if I have multiple variables for which I need Z Scores Calculated - how would I go about it using the macro? Sorry new to Alteryx and still learning - Any help would be appreciated 

Olga_S
5 - Atom

Thanks for Macro! very useful!

Labels