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

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
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.