cancel
Showing results for 
Search instead for 
Did you mean: 
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!




View solution in original post

Anonymous
Not applicable

Worked like a charm 🙂

scottsen
Memorable Member
Memorable Member

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.