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

Iterate through employee files to generate org chart

abDC49
5 - Atom

Hi!

 

I am trying to create an organization chart so that each employee is assigned a variable showing the count of people lower than themselves in the hierarchy.  For each employee, I have their immediate boss. 

 

This is representative input data:

EmployeeID of employeeEmployeeID of boss
11100
34
411
511
611

 

The output should show the number of people under each person, like this:

EmployeeID of employeecount
114
30
41
50
60
1005

 

I feel like I need to loop through the data but not sure where to start.  Can you help? 

 

4 REPLIES 4
john_miller9
11 - Bolide

Hi @abDC49 ,


This is similar to one of the weekly challenges here.

 

Have you taken a look at that example?

 

EDIT: Now that I'm thinking of it, this is a bit different from the exercise, but similar to an HR Hierarchy macro I created a few years ago.  Let me dig that up

smoskowitz
12 - Quasar

iterative macro will get the job done. There are videos on this type of macro. Have you had a chance to watch one? Let me know if you need further help.

 

Seth

john_miller9
11 - Bolide

@abDC49 

 

See the attached workflow which gets your employee counts by manager tree. Let me know if you have any questions.

 

Shout out to @jdunkerley and all of his contributions around hierarchies.  I've been leveraging and building upon his previous work in many iterative macros I've created.

 

Hierarchy Child Count.png

abDC49
5 - Atom

@john_miller9 - This is exactly what I was looking for.  Thank you so much! 

Labels