March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Experts,
I have requirement to calculate workday per month.
The Logic for workday calculation is:
Number of days per month minus public holidays, Saturdays, and Wednesdays. If a public holiday falls on a Wednesday, it should be additionally subtracted.
In the Master calender. I have a sepearet column to identify IsHoliday, IsSaturday and IsWednesday.
Attahced is the PBIX
Workdays.pbix
Thank you!
Solved! Go to Solution.
Hi @puru85
Modify the formula of column isworkday to :
Result :
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi @Ritaf1983 @mickey64 @ryan_mayu ,
Thank you for helping me.
The measure you have created is calculating:
Number of days per month minus public holidays, Saturdays, and Wednesdays.
But requirement is:
Number of days per month minus public holidays, Saturdays, and Wednesdays. If a public holiday falls on a Wednesday, it should be additionally subtracted.
Please refer to below Master Calender Table for May 2024.
1 May and 22 May is Public Holiday which falls on Wednesday so it should be additionally subtracted.
So the number of working days for May 2024 will be: 20.
Hi @puru85
You can add column to the calender like :
The pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi @puru85
Modify the formula of column isworkday to :
Result :
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Step 0: I use your PBIX file.
Step 1: I make 3 measures below.
M_All Days = COUNTROWS('MasterCalendar')
M_Holiday_Wed_Sat = COUNTROWS(FILTER('MasterCalendar','MasterCalendar'[IsHoliday]=TRUE()||'MasterCalendar'[IsSaturday]=TRUE()||'MasterCalendar'[IsWednesday]=TRUE()))
M_Workdays = [M_All Days]-[M_Holiday_Wed_Sat]
Step 2: I make a matrix below.
is this what you want?
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
128 | |
90 | |
75 | |
56 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |