Forum Discussion
puru85
2 years agoHelper II
Workday calculation
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 hol...
- 2 years ago
Hi puru85
Modify the formula of column isworkday to :Not work day =IF('MasterCalendar'[Date] IN VALUES('Public Holiday'[Date]) && MasterCalendar[Weekday Number] =4,2,IF('MasterCalendar'[Date] IN VALUES('Public Holiday'[Date]) || MasterCalendar[Weekday Number] =7 || MasterCalendar[Weekday Number] =4,1,0))Result :
modified pbix is attachedIf this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
mickey64
2 years agoSuper User
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.