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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Decimal to minutes and seconds

HELP! I have the next values :

Amanda_Mendez_0-1666130003705.png

When i open Power Query I set the data as duration and I can see the seconds and minutes, BUT when i close and apply this is the data I get 😞  I have tried the many solutions I found here but none has worked, I have no idea what to do next please help. 

 

PS: I tried this code but I get error 

Conversacion real time =
 
VAR _Seconds = SELECTEDVALUE('1'[CONVERSACION REAL.1])
VAR _Minutes = INT ( DIVIDE ( _Seconds, 60 ) )
VAR _RemainingSeconds = MOD ( _Seconds, 60 )
VAR _RemainingMinutes = MOD ( _Minutes, 60 )
RETURN
IF (
NOT ISBLANK ( _Seconds ),
FORMAT ( quotient(_Seconds,60), "00" ) & ":" & FORMAT ( mod(_Seconds,60), "00" ))
1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

There is not much problem with your formula.

Column:

vzhangti_0-1666166348191.png

You also need to convert the text format to a time format. You can use the function TIMEVALUE. 

TIMEVALUE function (DAX) - DAX | Microsoft Learn

Conversacion real time = 
 VAR _Seconds = [Time]
VAR _Minutes = INT ( DIVIDE ( _Seconds, 60 ) )
VAR _RemainingSeconds = MOD ( _Seconds, 60 )
VAR _RemainingMinutes = MOD ( _Minutes, 60 )
RETURN
TIMEVALUE(IF (
NOT ISBLANK ( _Seconds ),
FORMAT ( quotient(_Seconds,60), "00" ) & ":" & FORMAT ( mod(_Seconds,60), "00" )))

vzhangti_1-1666166481982.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

There is not much problem with your formula.

Column:

vzhangti_0-1666166348191.png

You also need to convert the text format to a time format. You can use the function TIMEVALUE. 

TIMEVALUE function (DAX) - DAX | Microsoft Learn

Conversacion real time = 
 VAR _Seconds = [Time]
VAR _Minutes = INT ( DIVIDE ( _Seconds, 60 ) )
VAR _RemainingSeconds = MOD ( _Seconds, 60 )
VAR _RemainingMinutes = MOD ( _Minutes, 60 )
RETURN
TIMEVALUE(IF (
NOT ISBLANK ( _Seconds ),
FORMAT ( quotient(_Seconds,60), "00" ) & ":" & FORMAT ( mod(_Seconds,60), "00" )))

vzhangti_1-1666166481982.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Pls help again. I get this data, is there a way to also show seconds? for example 17.39 = 00:17:23, thank you in advance 🙂 
Amanda_Mendez_0-1666195301396.png

 

Anonymous
Not applicable

YES! thank you so much, it is now in hh:mm:ss format. 🎊

amitchandak
Super User
Super User

@Anonymous , Change data type time and try

 

Or create a new column in dax

time(0,0,0) + [Column in hours]/24

 

or

 

time(0,0,0) + [Column in Minute]/(24*60)

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.