Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I'm struggling with writing my DAX formula to calcualte Amount Employees per manager
so heres how the table looks like
| employeeID | Position | MangerID |
| 100102 | Employee | 111008 |
| 100103 | Employee | 111008 |
| 100100 | Employee | 111008 |
| 111008 | Manager1 | 121101 |
| 121101 | Manager2 | 130241 |
As you can see the ManagerID are the refrence of the respective manager EmployeeID, so even the Manager1 and Manager2 could have another higher Manger of the top. But for now I just wanna see the amount of employees that a certain manager have.
Anyone who can help`?
Hi 🙂
For me this seems like you can simply use a distinct count.
For example:
0) Load the data you provided, call the table "Relations" or anything else.
1) Create this measure:
unique employees =
DISTINCTCOUNT(Relations[employeeID])2) Add the column "Manager" and the above created measure to a table visual or similar
Result:
This should give you the distinct count of employees directly connected to each manager.
@selected_ - hope this solves your problem. If so, consider accepting the answer as solution so it will be easier for others to find.
Additional note: It seems that your data may have parent-child hierarchy. E.g.
130241 Manages 121101,
121101 Manages 111008
, so 1303241 mangages 121101 "directly" and 11008 "indirectly" through child 121101.
If you want to account for the child-parent relations, you may want to read documenation of parten-child-functions:
https://learn.microsoft.com/en-us/dax/parent-and-child-functions-dax
https://radacad.com/parsing-organizational-hierarchy-or-chart-of-accounts-in-power-bi-with-parent-ch...
Kind regards!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 55 | |
| 48 | |
| 38 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 85 | |
| 70 | |
| 38 | |
| 28 | |
| 25 |