Forum Discussion
Ashfaq
7 years agoRegular Visitor
Absent Percentage Per Employee Distribution
Hello,
for the argument sake let us assume that we have following data,
| Dertment | Count of EMPID | No of Days Absent |
| Department 1 | 25 | 114 |
| Department 2 | 35 | 108 |
| Department 3 | 55 | 70 |
| Department 4 | 10 | 61 |
| Department 5 | 9 | 49 |
| Department 6 | 14 | 48 |
| Department 7 | 10 | 45 |
| Department 8 | 9 | 42 |
| Department 9 | 8 | 35 |
| Department 10 | 20 | 34 |
| Department 11 | 15 | 33 |
| Department 12 | 10 | 29 |
| Department 13 | 5 | 28 |
| Department 14 | 11 | 27 |
| Department 15 | 15 | 25 |
| Department 16 | 4 | 24 |
| Department 17 | 6 | 22 |
| Department 18 | 4 | 17 |
| Department 19 | 4 | 17 |
| Department 20 | 8 | 16 |
| Department 21 | 7 | 15 |
| Department 22 | 8 | 14 |
Now I need to calculate percentage of Employee based their No of Days absent and Employee distribution.
3 Replies
- AnonymousNot applicable
Hi Ashfaq,
You can try to use following measure if it works for your scenario:
Measure = VAR _curr = CALCULATE ( SUM ( Table[No of Days Absent] ), ALLSELECTED ( Table ), VALUES ( Table[DertMent] ), VALUES ( Table[EmpID] ) ) VAR _total = CALCULATE ( SUM ( Table[No of Days Absent] ), ALLSELECTED ( Table ), VALUES ( Table[DertMent] ) ) RETURN DIVIDE ( _curr, _total, -1 )Regards,
Xiaoxin Sheng
- AshfaqRegular Visitor
Anonymous Thankls for your input,
I applied all the steps you explained above, I do get 1 as value foe each department,
Wherein I need to distribute them as per Employees and Days absent.
- AnonymousNot applicable
Hi Ashfaq,
Can you please share a pbix file with some sample data and expected result for test? In your sample, it only contains summarized records.Regards,
Xiaoxin Sheng