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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
i820017
Resolver II
Resolver II

Convert Decimal Number to Mins:Seconds

Hey Everybody, 

I am trying to convert a decimal number into mm:ss in Power BI. 

I tried using the following measure

 
VAR _Seconds = [ASA]
VAR _Minutes = INT ( DIVIDE ( _Seconds, 60 ) )
VAR _RemainingSeconds = MOD ( _Seconds, 60 )
VAR _RemainingMinutes = MOD ( _Minutes, 60 )
RETURN
IF (
NOT ISBLANK ( [ASA] ),
FORMAT ( _RemainingSeconds, "00" ) & ":" &
FORMAT ( _RemainingMinutes, "00" )
)
 
The measure above yielded the following.
i820017_0-1620302514740.png

As you can see, my answer is rounding to the nearest minute. I need it to give the time in mm:ss.

Can anyone help with this?

 

Thanks

Dan 

1 ACCEPTED SOLUTION
i820017
Resolver II
Resolver II

I used an entirely different measure, and it worked.

Here is the measure that I used.

 

ASA4 =
VAR Duration = [ASA]
VAR Minute_ = INT ( [ASA] )
VAR Seconds =
ROUNDUP( ([ASA] - Minute_ ) * 60 ,0) 
VAR M =
IF (
LEN ( Minute_ ) = 1,
CONCATENATE ( "0", Minute_ ),
CONCATENATE ( "", Minute_ )
)
VAR S =
IF (
LEN ( Seconds ) = 1,
CONCATENATE ( "0", Seconds ),
CONCATENATE ( "", Seconds )
)"
RETURN IF(NOT ISBLANK([ASA]),
CONCATENATE ( M, CONCATENATE ( ":", S ) ) , "00:00")

View solution in original post

3 REPLIES 3
i820017
Resolver II
Resolver II

I used an entirely different measure, and it worked.

Here is the measure that I used.

 

ASA4 =
VAR Duration = [ASA]
VAR Minute_ = INT ( [ASA] )
VAR Seconds =
ROUNDUP( ([ASA] - Minute_ ) * 60 ,0) 
VAR M =
IF (
LEN ( Minute_ ) = 1,
CONCATENATE ( "0", Minute_ ),
CONCATENATE ( "", Minute_ )
)
VAR S =
IF (
LEN ( Seconds ) = 1,
CONCATENATE ( "0", Seconds ),
CONCATENATE ( "", Seconds )
)"
RETURN IF(NOT ISBLANK([ASA]),
CONCATENATE ( M, CONCATENATE ( ":", S ) ) , "00:00")
amitchandak
Super User
Super User

@i820017 , Try like

FORMAT ( quotient([_Seconds],60), "00" ) & ":" & FORMAT ( mod(_Seconds,60), "00" )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That didn't work. This is my output.

 

i820017_0-1620306626465.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors