I am looking to count the number of layers (not descendants) in an employee hierarchy.
Manager 1 has 3 direct reports
Mananger 2 reports to Manager 1 and has 4 Direct Reports
Manager 3 reports to Manager 2 and has 1 Direct Report
The result would be:
Manager 1 has 3 levels
Manager 2 has 2 levels
Manager 3 has 1 level
Any idea on how to calculate that? I have a list that has the employee reporting hierarchy. I had tried to add a level calc, but cases where there are multiple people reporting to the same manager (siblings) is causing a problem.
Thanks for the quick responses. I'm getting an error message "Datatype mapping used for aggregation does not match any dimension of the result"
Here's what I did:
Added Count line item, Number format, formula is 1
Added Max Level line item, Number format
Added this formula to the Max Level line item:
I've tried multiple variations of the datatypes and the formula. The Manager Name is a Line Item that contains the direct Manager. It is a List datatype, using a list that contains a manager hierarchy. Not sure what is causing the error
No list properties are needed and shouldn't be used. Everything you need is in the above module. So the Employee's List is really just a "flat" hierarchy where there are no levels since you are defining who the people roll up to. The Report to?, Manager L3, Manager L2, are list formated line items with the Employee Flat as the list. The count is a hardcoded "1", and the summary for the final is just a sum.