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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
SnirSh
Regular Visitor

Bad calculate result

hey,

im trying to calculate avg of a time colum (hh:mm:ss) but its not going well,

anyone have an idea?

 

סתם.JPGסתם1.JPG

 

1 ACCEPTED SOLUTION
KHorseman
Community Champion
Community Champion

@SnirSh oh yeah, I forgot that DAX doesn't really support duration data. Are the results of this average always going to be less than 24 hours? The few I can see look pretty short. If so you can change your measure to

 

AVG TIME IN QUEUE = FORMAT( AVERAGE(CTI[AVG wait time]), "HH:mm:ss")

 

If it can be more than 24 hours, this will be more complicated. What is the data type of your wait time column?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
MattAllington
Community Champion
Community Champion

Your visual looks like it is formatted as a decimal number. Try formatting it as time. Your data averages about 1 minute, which is 0.0007. And that rounds to 0.00



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Sorry i'm new BI desktop user. 

How can i define the visual format?

Thanks a lot!

KHorseman
Community Champion
Community Champion

@SnirSh Select your measure and go to the Modeling tab. The options for data type and formatting are there.

 

MeasureFormatting.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




There is no option to chage the data type at all, and as u see no option to define the format to 'date time'.

Thank a lot!

 

לכידה.JPG

 

KHorseman
Community Champion
Community Champion

@SnirSh oh yeah, I forgot that DAX doesn't really support duration data. Are the results of this average always going to be less than 24 hours? The few I can see look pretty short. If so you can change your measure to

 

AVG TIME IN QUEUE = FORMAT( AVERAGE(CTI[AVG wait time]), "HH:mm:ss")

 

If it can be more than 24 hours, this will be more complicated. What is the data type of your wait time column?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Yes, the AVG result alway will be around a few minutes.

I changed the formula like you said and its looking good now!

u r the best!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.