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

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.