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

How to convert a Numeric duration in seconds to MM:SS format?

Is there any way to display a Numeric duration in seconds field in MM : SS format? I do not want the output field to be in text format but in time format as I want to use it as an axis of a visual. Thanks in advance.

1 ACCEPTED SOLUTION
KHorseman
Community Champion
Community Champion

I'm assuming you brought this field in using the Duration data type in the query editor, which means it has been converted to a decimal in the data model. Is this meant as a display format on another measure like a sum or average of these durations? If so the formula is

 

Duration Display = FORMAT(SUM(TableName[Duration]), "MM:SS")

 

If you're using it as an axis value you will need to make a column rather than a measure. For that the formula is

 

Duration Column = FORMAT(TableName[Duration], "MM:SS")

 





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
KHorseman
Community Champion
Community Champion

I'm assuming you brought this field in using the Duration data type in the query editor, which means it has been converted to a decimal in the data model. Is this meant as a display format on another measure like a sum or average of these durations? If so the formula is

 

Duration Display = FORMAT(SUM(TableName[Duration]), "MM:SS")

 

If you're using it as an axis value you will need to make a column rather than a measure. For that the formula is

 

Duration Column = FORMAT(TableName[Duration], "MM:SS")

 





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

Proud to be a Super User!




Anonymous
Not applicable

Worked like a charm 🙂

Anonymous
Not applicable

certainly FORMAT( ) is what jumps out... can you explain why that won't work on Axis for you?

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.