community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcement | Get certified today - take the Alteryx Designer Core and Advanced exams on-demand now!
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.

Challenge #12: Creating an HR Hierarchy

Spoiler
I just did a simple iterative macro
Capture.PNG
Alteryx Certified Partner

I'm aware we were supposed to use an iterative macro here (and I will do shortly for the practice!) but I feel the following solution works just as well and is simpler. I got used the Append Fields tool to get do a cross join then used some very basic logic to massage the data into the right format. One issue was the analyst's man_id is 2 but the manager's is 1. I'd assumed these have to be in order of seniority so this is a bug in the input data. Obviously this could be corrected manually but I haven't here (as surely that defeats the purpose).

 

*My mistake... man_id is clearly the ID of their manager, not the 'paygrade' or 'level' of seniority. There's probably a way of working this out using the cross join method but I'm going to go with the iterative method as it's more interesting and efficient (I'd imagine!) anyway. 

the suggested visuals can also be obtained in NodeXL an addin for network graph... Trying to get it all in Alteryx. Thanks for your response.

Bolide

What a great bridge table! Wrote an iterative macro to handle the hierarchy.

 

Spoiler
Bridge Macro:
bridge.PNG
 
Alteryx Partner

Quite some trial and error to get my mind around the iterative macro and only because @Phil_L57 was around...Not sure I still get it... but it works

Fireball

Well i feel whooped. Probably not the sanest way to introduce oneself to iterative macros...

Bolide
Bolide

Learned a lot about iterative macros in last year's Santalytics!  This one was fun!.

Asteroid

It took a long time for this one to "click".

Alteryx Certified Partner

Solution attached.

 

Spoiler
challenge_12 - Snip.PNGThis is the worlkflowchallenge_12m - Snip.PNGThis is my iterative macro
Bolide

Solution attached. A very good test on iterative macro.