Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have HR abscence data by Employee (Step 1)
Absence ratio = Absence hour / Worktime hour
How can I calculate the ratio absence of the Organization category (Step 3), which will be the sum of average ratios by Departments? (Step 2)
Step 1- Detailed raw data is by Employee:
Organization | | Dept. | | Employee | | Absence_hour | | Worktime_hour | | Abscence Ratio |
O1 | D1 | E1 | 3 | 225 | 1,33% |
O1 | D1 | E2 | 0 | 225 | 0 |
O1 | D2 | E3 | 2 | 225 | 0,89% |
O1 | D2 | E4 | 3 | 225 | 1,33% |
O1 | D3 | E5 | 5 | 225 | 2,22% |
Step 2- Aggregated table by Department
Organization | | Dept. | | Abscence Ratio |
O1 | D1 | 0,67% |
O1 | D2 | 1,11% |
O1 | D3 | 2,22% |
Step 3- Target: Aggregated table by Organization. Absence ratio will be sum of department averages.
Organization | | Abscence Ratio |
O1 | 0,67+ 1,11 + 2,22 = %4 |
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a measure.
Absence ratio expected measure: =
SUMX (
VALUES ( Data[Dept.] ),
CALCULATE ( SUM ( Data[Absence_hour] ) / SUM ( Data[Worktime_hour] ) )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a measure.
Absence ratio expected measure: =
SUMX (
VALUES ( Data[Dept.] ),
CALCULATE ( SUM ( Data[Absence_hour] ) / SUM ( Data[Worktime_hour] ) )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
43 | |
19 | |
18 |