Showing results for 
Search instead for 
Did you mean: 

Working Day Number of Month

Super User
Super User
Super User

Working Day Number of Month

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]))



I have book! Learn Power BI from Packt

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!