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
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

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@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/

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
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.