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
TNewton
Regular Visitor

Minutes:Seconds conversion

Hello all!

 

I am very new to Power BI and trying to convert our reports from Excel to Power BI. My issue is that our reports export measure time in duration, where the time format is for example 1436:50 (1436 minutes and 50 seconds). I know how to work this in Excel, but anyone know how to convert this data into the proper HH:MM:SS format (23:56:50)? 

 

As always thanks in advance!

3 REPLIES 3
TNewton
Regular Visitor

Thank you to you both! I have another project I have to complete so I have put this one on hold, but wanted to express my graditude for all your time on this. I will try the above out and check back. 

 

Again thank you!

ppm1
Solution Sage
Solution Sage

The best way to handle durations is to convert it to a decimal (in days), load your table, write your DAX measures to do aggregation, and then format it at the end. You can do the first step with a custom column in the query editor with this expression.

 

= Number.FromText(Text.BeforeDelimiter([Duration], ":"))/24/60 + Number.FromText(Text.AfterDelimiter([Duration], ":"))/24/60/60

 

Then use the approach in this article to FORMAT as a time value however you like.

Calculate and Format Durations in DAX – Hoosier BI

 

Pat

 

Microsoft Employee
djurecicK2
Super User
Super User

Hi @TNewton 

 Here is one way to do this. First, select data view 

djurecicK2_2-1669752192203.png

 

Then select the column you'd like to change and click Format in the ribbon- you will see a long list of formats including time formats.

djurecicK2_3-1669752267900.png

Please consider accepting as solution if this answers the question- thanks!

 

 

 

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
Top Kudoed Authors