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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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