community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Iterate through employee files to generate org chart

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? 

 

Highlighted
Alteryx Partner

Hi @Farrington ,


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

Bolide

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

Alteryx Partner

@Farrington 

 

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

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

Labels