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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply

Hours difference between two dates & exclude bank holidays and weekends

Hi there, 

I am trying to find a simple way to calculate the hours difference between two dates. But I need to exclude bank holidays and weekends but also the calculation can only sum the hours in-between specified working hours(which is 9am to 6pm) . If something comes through outside of these working hours the sum would only start the next day at the working hour start time.
Screenshot 2023-12-13 010802.png

above are the refrence dates 
Previous date is the start date of a task and Action date is the end date of the task.
I WANT TO DO THIS IN POWER QUERY ONLY

i will be very thankful, if u help me out with this logic
i need to do it on a urgent basics (ASAP)
link of the Pbix file is given below
https://1drv.ms/u/s!AsQOj7VQoTfbkUrTCIwpZCrE-968?e=aNZ97N 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

3 REPLIES 3
WBD_01
New Member

Hello @lbendlin ,

 

I have a very similar requirement, but with different working hours. Struggling to find where I make this adjustment, be very glad of your help on this.

 

Many thanks in advance.

@WBD_01 Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

lbendlin
Super User
Super User

lbendlin_0-1702764143375.png

 

lbendlin_1-1702764172867.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.