cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Grand average of column average per category

Hi,

 

I have a dataset reflecting a process where suppliers ("company_ID") submits their offers ("% offered") in a tender round ("bidding_round").

- (1) Firms with 1-499 employees

- (2) Firms with 500+ employees

 

My end goal is to calculate the average price offered for either of the following two segments based on the user's input in another sheet ("Segment chosen?"), subject to two important criteria:

- (1) Only suppliers that have submitted at least 2 prices IN A SEGMET should be included (so supplier 19 and 20 should be excluded in 500+ segment, but supplier 20 should be included in the 1-499 segment where supplier 1 should then be exluded).

- (2) The average should be an average of each firm's average price (so ultimately e.g. 34,10% rather than 34,84% in the 500+ segment).

 

Company_IDBidding_round% offeredEmployeesSegment chosen?
233916,0%660TRUE
333925,1%660TRUE
433942,5%660TRUE
234049,8%890TRUE
235438,0%1200TRUE
435435,6%1200TRUE
335427,3%1200TRUE
135452,0%1200TRUE
234144,4%670TRUE
1933940,3%660TRUE
2035458,3%1200TRUE
2077080%200 
2098985%350 
176582,%100 

 

Any help is greatly appreciated. Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

OK, I did what I think is correct but not sure. See PBIX.

 

 

Average of the Average = 
    AVERAGEX(
        FILTER(
            SUMMARIZE(
                'Table',
                [Company_ID],
                "__Count",COUNTROWS('Table'),
                "__Average",AVERAGE('Table'[% offered])
            ),
            [__Count] > 1
        ),
        [__Average]
    )

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Highlighted
Super User IV
Super User IV

OK, I did what I think is correct but not sure. See PBIX.

 

 

Average of the Average = 
    AVERAGEX(
        FILTER(
            SUMMARIZE(
                'Table',
                [Company_ID],
                "__Count",COUNTROWS('Table'),
                "__Average",AVERAGE('Table'[% offered])
            ),
            [__Count] > 1
        ),
        [__Average]
    )

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Highlighted

Excellent, worked a charm. Thank you for the fast reply!

Highlighted

Sweet! Always helps to provide the data so thank-you very much for that! You made it easy!


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors