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

View all the Fabric Data Days sessions on demand. View schedule

Reply
stribor45
Post Prodigy
Post Prodigy

Show duration as mm:ss

This is my DAX code as a measure to show average time of the call

 

AVG TIME = 
  
    VAR X = SUM('Table'[Column])
    VAR Y = A + B
    RETURN FORMAT (DIVIDE(X, Y), "hh:mm:ss") & " min"

My result looks like this

00:14:33

which is correct result when comparing this by going into the excel and calculating average there. I would like this to be shown as 

14:33

but as soon as I adjust formating string to 

"hh:mm"

my result changes and looks incorrect. Is there a way to show this value as "14:33"

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

pls try this

AVG TIME = 
  
    VAR X = SUM('Table'[Column])
    VAR Y = A + B
    VAR _tim =FORMAT (DIVIDE(X, Y), "hh:mm:ss") & " min"
 RETURN 

MID(_tim, SEARCH(":",_tim,1,1)+1,5)

View solution in original post

1 REPLY 1
Ahmedx
Super User
Super User

pls try this

AVG TIME = 
  
    VAR X = SUM('Table'[Column])
    VAR Y = A + B
    VAR _tim =FORMAT (DIVIDE(X, Y), "hh:mm:ss") & " min"
 RETURN 

MID(_tim, SEARCH(":",_tim,1,1)+1,5)

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors