Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
What would be the correct way to calculate this following scenario:
Task | Employee |
1 | Employee1 |
1 | Employee2 |
1 | Employee2 |
1 | Employee3 |
1 | Employee4 |
1 | Employee5 |
2 | Employee1 |
2 | Employee2 |
2 | Employee3 |
2 | Employee 4 |
Notice, one employee is assigned twice which is normal in this dataset.
Using this measure formula I get:
#ofemployees_per_task = CALCULATE(DISTINCTCOUNT(Table1[EmployeeID])/DISTINCTCOUNT(Table1[ProjectID]))
Which is correct.
Task | # of Employees |
1 | 5 |
2 | 4 |
However, when looking at the total, this is not correct:
# of tasks | # of employees |
2 | 5 |
Instead, the desired result is:
# of tasks | # of employees |
2 | 9 |
Solved! Go to Solution.
Hi,
I am very confused about what you want. Anyways, if you want to add the number of employees for both tasks, then try these measures:
Employee count = distinctcount(Table1[EmployeeID])
Measure = SUMX(VALUES(Table1[Task]),[Employee count])
Hope this helps.
Check out the May 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
71 | |
70 | |
51 | |
47 |
User | Count |
---|---|
45 | |
38 | |
29 | |
29 | |
28 |