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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Time diff format calculation measure

Hey I m trying to convert calculation into time format but with no luck ( i have been trying to use mod/ int functions and adding "min" "sec" text). The aim is to apply is to a chart
 
Original formula:
Avarage time for 1 board =
VAR TU =
    FILTER ( TJob, TJob[SekundærNavn] = "Quality control HMD" )
RETURN
    DIVIDE (
        SUMX ( TU, TJob[Time diff] ),
        SUMX ( TU, TJob[Antal] )
        )
 
Time diff =
DATEDIFF(TJob[Start],TJob[**bleep**], MINUTE)
 
Could someone help me convert it? 
2 REPLIES 2
Anonymous
Not applicable

Its similar workaround to mod/ int solution as text

 

It may work for table row visual but i m calculating numerical values from many to one key id. I cant apply this function to chart 

v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Thanks for reaching out to us.

you have to convert calculation into time format by using measure like below,

example:

fmtCol = 
RIGHT ( "0" & INT ( TableName[Duration] / 3600 ), 2 )
    & ":"
    & RIGHT (
        "0"
            & INT ( ( TableName[Duration] - INT (TableName[Duration] / 3600 ) * 3600 ) / 60 ),
        2
    )
    & ":"
    & RIGHT ( "0" & MOD (TableName[Duration], 3600 ), 2 )

Solved: formatting time value to hh:mm:ss - Microsoft Power BI Community

 

Best Regards,

Community Support Team _Tang

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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