Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Your file has been submitted successfully. We’re processing it now - please check back in a few minutes to view your report.
09-03-2018 12:14 PM - last edited 09-18-2018 09:24 AM
Simple formula to calculate the working day of the month. Edited to handle multiple years.
m_WorkingDayNumberofMonth =
VAR __myDate = MAX([Date])
VAR __tmpTable = FILTER(ADDCOLUMNS(ALL('Calendar'),"__Year",YEAR([Date]),"__Month",MONTH([Date]),"__WeekDay",WEEKDAY([Date],2)),[__WeekDay]<6)
VAR __tmpTable1 = FILTER(__tmpTable,[__Month]=MONTH(__myDate) && [__Year]=YEAR(__myDate))
RETURN IF(WEEKDAY(__myDate,2)>5,BLANK(),COUNTX(FILTER(__tmpTable1,[Date]<=__myDate),[Date]))
eyJrIjoiMzIzNWFjNDEtYTVlMi00NmM1LWIxNzYtNTlkZGYwODBmYjQ0IiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9