Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Open days to count ?

Hello, 

 

I'm working on a dax to calculate the open days in a month. For example, I would like to calculate the open days of March month. So the dax that I wrote is : 

 
OD = CALCULATE(DISTINCTCOUNT('Calendar'[Date]),FILTER('Calendar','Calendar'[Month]=MONTH(NOW())+1))
 
So the result is: 31 days, is the number of all days of March month.
Do you have any tips to calculate the open days of any month? 
 
Thank you in advance.
Regards,
1 ACCEPTED SOLUTION

@Anonymous ,

Suppose you have Date Column with Date format so create a new Calculated Column like below:

WeekdayFlag = if(weekday('Calendar'[Date]) = 1,0,if(weekday('Calendar'[Date])=7,0,1))
Then take only Month in table and above calculated column so you'll something like below:
Capture.PNG
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , Not very clear what is open days?

 

Total day in current month = day(eomonth(Today(),0)

Total day in next month = day(eomonth(Today(),1)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak Open days are the days that we work on: from Monday to Friday. Example for March the open days are 23, not 31. I would like to calculate it for all months  ! 

 

Regards,

@Anonymous 

Work Day = COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(EOMONTH(TODAY(),0)+1, EOMONTH(TODAY(),1)),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1))

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@Anonymous ,

Suppose you have Date Column with Date format so create a new Calculated Column like below:

WeekdayFlag = if(weekday('Calendar'[Date]) = 1,0,if(weekday('Calendar'[Date])=7,0,1))
Then take only Month in table and above calculated column so you'll something like below:
Capture.PNG
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

@Anonymous , for next month

 

Work Day = COUNTROWS(FILTER(ADDCOLUMNS(CALENDAR(EOMONTH(TODAY(),0)+1, EOMONTH(TODAY(),1)),"WorkDay", if(WEEKDAY([Date],2) <6,1,0)),[WorkDay] =1))
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors