Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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 🙂
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!
Proud to be a Super User!