Forum Discussion
Span of Control
- 8 years ago
You could simply add a new column with DAX:
Span of Control = VAR x = [Employee] RETURN CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', x = [Manager] ) )You should change the 'Table' with your table name.
Edit: You may add a " + 0" after the "COUNTROWS(TABLE)" in order to not display null results
You could simply add a new column with DAX:
Span of Control =
VAR x = [Employee]
RETURN
CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', x = [Manager] ) )You should change the 'Table' with your table name.
Edit: You may add a " + 0" after the "COUNTROWS(TABLE)" in order to not display null results
- wwhittenton8 years agoHelper II
Assuming your employees don't repeat, Smauro gave a better solution than I did. Kudos to him.
- Smauro8 years agoSolution Sage
wwhittenton you are right, thank you!
I took it for certain that the employees would be unique.. If not, then your solution works better.- wwhittenton8 years agoHelper II
Smauro In retrospect, that's the better (or perhaps only viable) assumption. If the employees are not unique, the span of control calculation comes out incorrect either way, because the manager an individual reports to would be double-counted even in the new table.
Thanks for the good wishes and happy holidays to you and to you as well, PauloH.
- tdemoss8 years agoNew Member
I was battling with this same issue and this worked for me as well! Thank you!!!