cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
XeperRx
Frequent Visitor

Ignore certain time periods during duration calculations

Hello, 

 

I'm calculating total build time. Here is the DAX calculation that I'm using - 

 

Build Time = DATEDIFF('Job Management Historical'[Build Start], ('Job Management Historical'[Potting Staged]), MINUTE) + (DATEDIFF('Job Management Historical'[Build Resume Time], ('Job Management Historical'[Build Complete]), MINUTE))
 
I need to ignore certain time periods in this calculation - 
 
M-F : 12:00 PM - 12:30 PM 
M-Th :  4:30 PM - 8:00 AM
Weekends : F 4:00 PM - M 8:00 AM 
 
Thank you in advance for your help! 
1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @XeperRx ,

 

 

Please check if these help.

 

https://exceleratorbi.com.au/calculating-business-hours-using-dax/

https://exceleratorbi.com.au/calculating-elapses-business-hours-using-dax-part-2/

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

View solution in original post

2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @XeperRx ,

 

 

Please check if these help.

 

https://exceleratorbi.com.au/calculating-business-hours-using-dax/

https://exceleratorbi.com.au/calculating-elapses-business-hours-using-dax-part-2/

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

@harshnathani ,

 

Thank you!! This is exactly what I was looking for!

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors