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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
BobKoenen
Helper IV
Helper IV

Sum all values dependend on value on another column

Hi all,

 

I have a large database of entered Hours. And I want to calculate the overall average hourRate using an ALL measure so I can show the overal average hourrate in comparison per employee/projectleader etc. 

However my dataset also contains overhead = Hour ID 2 and sales hours Hour ID 3. I want to calculate the average Hour rate only for hour ID 1. And this should not be dependent on filters in the report, therefore I was thinking about an ALL measure. But I cannot seem to use and all measure which does contain a filter in de measure.

 

Does anyone have an idea about how I could do this.  

 

Hour IDAmount hoursSales amount
1440
1660
25100
25120
360
1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @BobKoenen 

 

You can create a measure and place it in a card visual for instance.

If you want the average per line:

 

Measure =
AVERAGEX (
    FILTER ( ALL ( Table1 ); Table1[Hour ID] = 1 );
    DIVIDE ( Table1[Sales Amount]; Table1[Amount Hours] )
)

 

If you want the weighted average (by number of hours):

 

Measure =
DIVIDE (
    CALCULATE ( SUM ( Table1[Sales Amount] ); Table1[HOURS ID] = 1; ALL ( Table1 ) );
    CALCULATE ( SUM ( Table1[Amount Hours] ); Table1[HOURS ID] = 1; ALL ( Table1 ) )
)

View solution in original post

2 REPLIES 2
AlB
Community Champion
Community Champion

Hi @BobKoenen 

 

You can create a measure and place it in a card visual for instance.

If you want the average per line:

 

Measure =
AVERAGEX (
    FILTER ( ALL ( Table1 ); Table1[Hour ID] = 1 );
    DIVIDE ( Table1[Sales Amount]; Table1[Amount Hours] )
)

 

If you want the weighted average (by number of hours):

 

Measure =
DIVIDE (
    CALCULATE ( SUM ( Table1[Sales Amount] ); Table1[HOURS ID] = 1; ALL ( Table1 ) );
    CALCULATE ( SUM ( Table1[Amount Hours] ); Table1[HOURS ID] = 1; ALL ( Table1 ) )
)

Thanx for your answer!

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Kudoed Authors