Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!
SOLVED

Iterate through employee files to generate org chart

Highlighted
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? 

 

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

Highlighted
11 - 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

Highlighted
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

Highlighted
5 - Atom

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

Labels