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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Hundoa
Frequent Visitor

Count of working days between two date columns, excluding holidays

Hello,

 

I've looked at a number of posts on similar issues, however I still can't get this to work. 

 

I have a table with work received and closed dates in separate columns. I need to calculate the number of working days between the two dates, excluding and holidays. 

 

1.PNG

 

I have a date table set up, which pulls through the holidays from another table and a column which gives a 1 or 0, depending on whether it is a working day or not, using the following logic

 

Duration 1/0 = IF(OR('Date Table'[Day of Week]=5,'Date Table'[Day of Week]=6),0,IF('Date Table'[Is Bank Holiday]="",1,0))

 

2.PNG 

Using DATEDIFF, I can get the number of days between the two date field, however I'm getting stuck on how to filter out the holidays on the date table. 

 3.PNG

 

Days between Rec/Closed = DATEDIFF('Workflow Duration'[Received Date],'Workflow Duration'[Closed Date],DAY)+1

 

Could someone please let me know what I should be doing with the logic to achieve this?

 

Thank you. 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Hundoa , refer two the second page - workday diff of the attached file after signature

Or Refer :https://www.sqlbi.com/articles/counting-working-days-in-dax/

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Hundoa 

Check my example below, pbix also attached. You may add other bank holiday conditions to the filter if you have.

Column = CALCULATE(COUNTROWS('Date table'),
                FILTER('Date table',[Date]>=EARLIER(([Start]))&&[Date]<=EARLIER([Close])),
                FILTER('Date table',WEEKDAY('Date table'[Date],2)<>6 &&WEEKDAY('Date table'[Date],2)<>7))

 working days in range.JPG


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Hundoa , refer two the second page - workday diff of the attached file after signature

Or Refer :https://www.sqlbi.com/articles/counting-working-days-in-dax/

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.