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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.