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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
PeteS
New Member

Duration displayed in HH:MM:SS - Need to get average

Hi all,

I have this column which shows the duration which a ticket was open for, in the format - HH:MM:SS
PBI sees this as a text field, i'm assuming because of the format.

In my visuals, I want to be able to show averages - however can't (I guess because it's a text field?)

How can I achieve this? Thank you!

PeteS_0-1694183416780.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PeteS 

You can try the following solution

1.Add a column

Column = HOUR([Column1])*3600+MINUTE([Column1])*60+SECOND([Column1])

2.Create the following measures

Measure = AVERAGE('Table'[Column])
Average = var a = ROUNDDOWN([Measure]/3600,0)
var b=ROUNDDOWN(DIVIDE([Measure]-3600*a,60),0)
var c=[Measure]-3600*a-60*b
return FORMAT(TIME(A,B,C),"hh:mm:ss")

Output

vxinruzhumsft_0-1694488569114.png

Best Regards!

Yolo Zhu

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

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @PeteS 

You can try the following solution

1.Add a column

Column = HOUR([Column1])*3600+MINUTE([Column1])*60+SECOND([Column1])

2.Create the following measures

Measure = AVERAGE('Table'[Column])
Average = var a = ROUNDDOWN([Measure]/3600,0)
var b=ROUNDDOWN(DIVIDE([Measure]-3600*a,60),0)
var c=[Measure]-3600*a-60*b
return FORMAT(TIME(A,B,C),"hh:mm:ss")

Output

vxinruzhumsft_0-1694488569114.png

Best Regards!

Yolo Zhu

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

 

 

chonchar
Helper V
Helper V

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.