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
key_master_95
Frequent Visitor

Average of time

Hello!

I have tablee with time column in format - hh:mm. The column indicated as Spend time on site. Now, I need to define avarage of this column. 

When I created card and added  Spend time on site to value thus I received uncorrect decimal number.

 

How I can fix it?

Thank you in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @key_master_95 ,

 

The DAX is basically summarizing the result. Please add the FORMAT function at the beginning and format it accordingly as you need.

Measure = FORMAT(AVERAGEA('Table'[Time]), "HH:MM:SS")

This should give you the output in the Time Format.

vstephenmsft_0-1675065328447.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

6 REPLIES 6
pbix1
Resolver I
Resolver I

Hi key_master_95

 

You could change the time into a number of minutes.

 

Column = value('Table'[Column1])*1440
 
Would give you the time spent in minutes. You could then perform an average on this. Would that work?
 
If you needed to have the average time in hours and minutes, you could then have another calculation to turn the average back into hours and minutes. That would be my suggestion.
 
Neil

I tried it too, but here was a problem with data format. 

Thank you for answer!

Anonymous
Not applicable

Hi @key_master_95 ,

 

The DAX is basically summarizing the result. Please add the FORMAT function at the beginning and format it accordingly as you need.

Measure = FORMAT(AVERAGEA('Table'[Time]), "HH:MM:SS")

This should give you the output in the Time Format.

vstephenmsft_0-1675065328447.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

It works. Perfect!

Thank you a lot!

Greg_Deckler
Community Champion
Community Champion

@key_master_95 Check these out:

Duration to Seconds Converter - Microsoft Power BI Community

Chelsie Eiden's Duration - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thsnk you, but it doesn't work. I taped this formulas, but result is 0 (it's not true). I think, the first step is convert from HH:MM:SS to integer. But I don't know how to do it

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.