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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jorgeaguirre
Advocate I
Advocate I

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.