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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Minute Decimal number to HH:MM:SS

Hi!

 

I've got a measure containing the following formula 

TRUCK_TVT_95PERCENTILE = CALCULATE(PERCENTILE.EXC(Truck_Visits[TVTinMinutes];0,95))
 
I want to format this number into HH:mm:ss. 
 
How do I do this?
 
See attached printscreen for sample data.Annotation 2019-09-18 145920.png
3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Anonymous ,

You can try to use following calculated column if it is suitable for your requirement:

Decimal to HMS =
VAR _original = Table[Value] / 0.95
VAR _second =
    INT ( MOD ( _original, 1 ) * 60 )
VAR _minute =
    MOD ( ROUND ( _original, 0 ), 60 )
VAR _hour =
    INT ( _original / 60 )
RETURN
    _hour & ":"
        & IF ( _minute < 10, "0" & _minute, _minute ) & ":"
        & IF ( _second < 10, "0" & _second, _second )

Notice: if you do not need to calculate on original result, you can remove first variable and directly use your column in expression.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
jthomson
Solution Sage
Solution Sage

Knowing if that's 42.88 hours or 42.88 minutes would be a start

Anonymous
Not applicable

It's 42.88 minutes.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.