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.
Hi,
I am working on a Power BI report to work out how many working days each person has in a month.
I have been able to get to the stage where I have subtracted weekend, sick leave, holiday and bank holidays - but I have one person who does not work mondays.
At the moment I am using the following measure to count total working days:
I have a separate measure to count the number of Mondays - but I cannot figure out how to subtract the [No. of Mondays] from just her total? Please help!
I want to show in a table:
Name | Total working days in month |
Person A | 22 |
Person B (who doesn't work mondays | 18 |
Solved! Go to Solution.
Hi, @gingerclaire
If you just want to subtract the [No. of Mondays] from just Person B total, please add a new measure like:
Result1 =
IF (
MAX ( 'Table'[Name] ) = "Person B",
// MAX ( 'Table'[Name] ) IN { "Person B", "Person xx" },
[Total working days in month],
[Total working days in month] - [No. of Mondays]
)
Best Regards,
Community Support Team _ Eason
Hi, @gingerclaire
If you just want to subtract the [No. of Mondays] from just Person B total, please add a new measure like:
Result1 =
IF (
MAX ( 'Table'[Name] ) = "Person B",
// MAX ( 'Table'[Name] ) IN { "Person B", "Person xx" },
[Total working days in month],
[Total working days in month] - [No. of Mondays]
)
Best Regards,
Community Support Team _ Eason
This worked - thank you so much! Only problem is I can't get the totals to show the 'correct' amount in the table (common measures issue but I don't quite understand how to fix it no matter how much time I spend reading about it!)
@gingerclaire , for the workday of the month you can use networkdays and customize it as per each person
https://amitchandak.medium.com/power-bi-dax-function-networkdays-5c8e4aca38c
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 |