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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.