Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.