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

Average hours

Hi, I'm new to "power bi" I'm working on a project with direct query

 

I need to get the AVERAGE, grouped by hours.

COM.PNG

 

 

 

 

1 ACCEPTED SOLUTION
v-haibl-msft
Microsoft Employee
Microsoft Employee

@jorgeaguirre

 

Do you have a Arrival Time column in your table? If yes, please try with following measure.

 

AVERAGE = 
FORMAT (
    CALCULATE (
        AVERAGE ( Table1[Arrival Time] ),
        ALLEXCEPT ( Table1, Table1[TimeHour] )
    ),
    "HH:MM: SS"
)

Average hours_1.jpg

 

Best Regards,
Herbert

View solution in original post

5 REPLIES 5
v-haibl-msft
Microsoft Employee
Microsoft Employee

@jorgeaguirre

 

Has your problem got resolved? If yes, you can mark the right answer as solution so that other people who have the same problem can find the right answer quickly.

 

Best Regards,
Herbert

 

Hi, if your answer helped me with the above problem.

But I have another very similar problem in that I try to use the same formula but I can not make it work.

 

I'm working with "direct query" and I need to get the average "work time"

Something very similar to this. AVERAGE_WT = FORMAT (AVERAGE (View_AllRequests [Average Work Time]), "HH: MM: SS")

But I always get error.

 

Untitled.png 

Untitleda.png

 

 

 

 

@jorgeaguirre

 

What is the error message if you click See details?

 

Best Regards,
Herbert

Untitled.png

 

 

 

v-haibl-msft
Microsoft Employee
Microsoft Employee

@jorgeaguirre

 

Do you have a Arrival Time column in your table? If yes, please try with following measure.

 

AVERAGE = 
FORMAT (
    CALCULATE (
        AVERAGE ( Table1[Arrival Time] ),
        ALLEXCEPT ( Table1, Table1[TimeHour] )
    ),
    "HH:MM: SS"
)

Average hours_1.jpg

 

Best Regards,
Herbert

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.