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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
cmbalderrama
Frequent Visitor

Format function not working with average time

Hello, I have a colume type time with hh:mm:ss format (I also tried with column type decimal number) where I have some time in hours, but on the report I want to display on a card the average of those hours in the format hh:mm:ss .
So I created a new mesure.
When I try

Measure = AVERAGE(v_serviceDesk_all_tickets[FR time]) it works fine, it returns the right average hours, but when I try to add the format to display it like hh:mm:ss doing this in the mesure:
Measure FR time = FORMAT(AVERAGE(v_serviceDesk_all_tickets[FR time]),"hh:mm:ss") I get the wrong time, as you can see on the images the avg hours are 18.71 so it should be displayed 18:42:36 but is displaying 16:59:12


cmbalderrama_0-1677258420650.png

cmbalderrama_1-1677258573333.png

 

am I doing something wrong? or this kind of formatting is not possible?

Thanks in advance 

1 ACCEPTED SOLUTION

Avg hrs = format(AVERAGE('Sheet1'[testColumn])/24,"hh:nn:ss")

View solution in original post

4 REPLIES 4
cmbalderrama
Frequent Visitor

Hello, here's a sample of the data:

testColumn
0.345052
1.26448
1.062005
1.592334
1.687068
8.605558
2.221111
133.8976
9.355112
16.42302
3.670533
0
22.25821
19.62049
4.581776
4.611682
4.606313
2.107781
0.284248
61.97771
44.53185
0.145399
0.059141
0.708148
0.720206
0.027067
0.072263
0.125726
0.435254
0.74491
1.505
5.680024
0
1.300322
48.16167
3.304485
0.435254
0.435254
0.027067


According to this data the average measure should be 10,48 (which is fine) but then when format in hh:mm:ss should be 10:28:48 (EXPECTED RESULT)  and Im getting 11:26:26
Here are the 2 measures im using:

 

avg = AVERAGE(Sheet1[testColumn])
formatMeasure = FORMAT(AVERAGE(Sheet1[testColumn]),"hh:nn:ss")
 
the column testColumn is of type decimal number
cmbalderrama_0-1677368150569.png

Is there anything else you need to know?
Thanks

 

Avg hrs = format(AVERAGE('Sheet1'[testColumn])/24,"hh:nn:ss")

Thank you! that worked.

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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