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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
BIlix
Helper II
Helper II

Divide a value by Distinct Count of Employees

Hello Community,

I have a measure which Calculates the DistinctCount of employees who worked in  a Project.

I need to divide a measure with working Hours, by this distinct count. I need the result for further calculation. The current Problem is, that in the Employee Context, the Count does not show the total amount of employees.

Example:

750 Working Hours, DistinctCount Result is 3 Employees -> 250 Hours per Employee

But on the Employee Level its 750 Working Hours, Distinct Count Result is 1 Employee.  -> 750 Hours per Employee

I used ALL and also ALLEXCEPT but did not manage to get a proper result.

VAR CountofEmployees = Calculate ( 
Distinctcount(FactTable[EmployeeID]),
ALL(FactTable[EmployeeID],
FILTER(FactTable, Related(DimProject[ID]) = 1))
VAR Calculation = DIVIDE([Working Hour MEasure], CountOfEmployees)
RETURN
CALC


Appreciate any help 🙂

1 REPLY 1
some_bih
Super User
Super User

Hi @BIlix for distinctcount of employees usually Distinctcount(FactTable[EmployeeID]) should be fine.

Try CountofEmployees = Distinctcount(FactTable[EmployeeID])

Did I answer your question? Mark my post as a solution! Kudos Appreciated!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.