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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors