Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
selected_
Helper IV
Helper IV

I wanna see amount employee per manger

I'm struggling with writing my DAX formula to calcualte Amount Employees per manager

 

so heres how the table looks like

 

employeeIDPositionMangerID
100102Employee111008
100103Employee111008
100100Employee111008
111008
Manager1121101
121101Manager2130241

 

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

 

1 REPLY 1
Anonymous
Not applicable

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. 

cosm_1-1687802179891.png

 


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:

cosm_0-1687802130747.png

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!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.