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 Power BI gurus,
Looking for help in achieving the following. Thank you akready for the support.
1. I have list of employees who post Hours on daily basis.
2. The maximum total hours per day are based on the day of the week for ex: monday to friday are 8 hr, and sat-sun 0 hr. I am creating a separate mapping table to store this value.
3. I want to compare the actual hours Vs the max hours.
The final DAX measures I am looking for is:
Count of number of days per month per person when Actual Hours > Max Hours
Count of number of days per month per person when Actual Hours < Max Hours
Also, if possible can I do conditional formatting based on these criteria?
Given data
Date | Weekday | Person | Actual Hours |
Monday, June 1, 2020 | Monday | P1 | 8 |
Tuesday, June 2, 2020 | Tuesday | P1 | 9 |
Wednesday, June 3, 2020 | Wednesday | P1 | 8 |
Thursday, June 4, 2020 | Thursday | P1 | 8 |
Friday, June 5, 2020 | Friday | P1 | 7 |
Saturday, June 6, 2020 | Saturday | P1 | 0 |
Sunday, June 7, 2020 | Sunday | P1 | 0 |
Monday, June 8, 2020 | Monday | P1 | 6 |
Tuesday, June 9, 2020 | Tuesday | P1 | 8 |
Wednesday, June 10, 2020 | Wednesday | P1 | 8 |
Comparison table
Weekday | Max Hours |
Monday | 8 |
Tuesday | 8 |
Wednesday | 8 |
Thursday | 8 |
Friday | 7 |
Saturday | 0 |
Sunday | 0 |
Solved! Go to Solution.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 |
---|---|
47 | |
24 | |
20 | |
15 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
19 |