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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.