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.
I've setup a data table where I'm calculating each employee's union hours as a percentage of total hours per week. What I need to do, is count the number of employees which have at least one week with a % of total >=25%. Below is an example table I've created. For example, Tim Smith has 2 weeks where he had over 25% of his time as union time. I only want to include him in the count, I don't want to count the number of instance he has.
So, for the example table below, I have 6 employees where they have at least one instance of union hours >=25%
Employee ID | Week Ending Date | Employee - HID | Timecard ID | Union Time | All Other Hours | Total Hours | % of Total | Count I want |
9954419 | 10/23/2022 | John Doe | 8434473 | 24 | 96.5 | 120.50 | 19.92% | |
2274131 | 10/23/2022 | Tim Smith | 8428358 | 40 | 40.00 | 100.00% | 1 | |
2274131 | 11/6/2022 | Tim Smith | 8436955 | 40 | 40.00 | 100.00% | ||
2274131 | 10/30/2022 | Tim Smith | 8433180 | 25 | 15 | 40.00 | 62.50% | |
1912412 | 10/23/2022 | Deb Jones | 8426655 | 1 | 39 | 40.00 | 2.50% | |
4216401 | 10/23/2022 | Tanya Doe | 8426640 | 15 | 25 | 40.00 | 37.50% | 1 |
3545215 | 11/6/2022 | Tim Jones | 8443383 | 40 | 40.00 | 100.00% | 1 | |
3545215 | 10/23/2022 | Tim Jones | 8426386 | 19 | 21 | 40.00 | 47.50% | |
3752378 | 10/23/2022 | Jacob Allen | 8426538 | 39 | 11 | 50.00 | 78.00% | 1 |
1646016 | 10/30/2022 | Chris Talbot | 8435837 | 2 | 38 | 40.00 | 5.00% | |
1281941 | 10/23/2022 | Doug Hempler | 8426191 | 5 | 67.5 | 72.50 | 6.90% | |
0039230 | 10/23/2022 | Ian Hunt | 8428083 | 40 | 40.00 | 100.00% | 1 | |
0039230 | 10/30/2022 | Ian Hunt | 8435123 | 40 | 40.00 | 100.00% | ||
0039230 | 11/6/2022 | Ian Hunt | 8442767 | 40 | 40.00 | 100.00% | ||
7884144 | 10/30/2022 | Ron Irish | 8430803 | 8 | 45.7 | 53.70 | 14.90% | |
7884144 | 10/23/2022 | Ron Irish | 8442593 | 7 | 57.5 | 64.50 | 10.85% | |
6572161 | 10/23/2022 | Paul Jet | 8429598 | 40 | 40.00 | 100.00% | 1 | |
6572161 | 10/30/2022 | Paul Jet | 8432164 | 5 | 35 | 40.00 | 12.50% | |
Total Employees with at least one week >=25% of Total | 6 |
Solved! Go to Solution.
try to create a measure with the code below:
try to create a measure with the code below:
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 |
---|---|
44 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
70 | |
49 | |
45 | |
20 | |
16 |