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
Anonymous
Not applicable

Calculate difference between two dates in Minutes

Hi all

 

So i have two dates, One is the [Created Date] and One is the [Completed Date].

 

I was able to calculate the difference between these based on Work Days(ie Exclude Holidays and Weekends). 

 

I did this through creating a Date Table with a list of holidays/weekends.

 

So i have the Work Days Between the two Dates. However i am trying to get the Work Minutes. 

 

So say it's Created on 11/05/2021 at 11:50am and closes the same day at 12pm. How can i get this to display the minutes and not only the days? Say between the normal Business Hours of 9am to 5pm? Thanks

 

Mali2020_0-1627533474563.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , There is blog around business hour. See if that can help

https://exceleratorbi.com.au/calculating-business-hours-using-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

4 REPLIES 4
Linnil
Helper III
Helper III

Matt Allington is a great BI mind 

Anonymous
Not applicable

@Anonymous 

 

The simplest method is using power query, add a custom column and change the data type from duration to Text. So the below solution is 58days, 23 hrs, 19mins.

 

Vpazhenmsft_1-1627870418300.png

 

 

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

@Anonymous , There is blog around business hour. See if that can help

https://exceleratorbi.com.au/calculating-business-hours-using-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
Anonymous
Not applicable

Thank you - i actually found Part 2 of the link you sent more useful and easier to digest(and it worked).

For anyone looking at this in the future, the linked provided by Amit works but Part 2 works too: https://exceleratorbi.com.au/calculating-elapses-business-hours-using-dax-part-2/

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.