Forum Discussion

brian0782's avatar
brian0782
Helper II
5 years ago
Solved

Calculate Average based on Multiple Columns

Hi

 

I have the following dataset in PBI but struggling to find a way to calculate the average across multiple columns.

 

For example, the below average is 15.96 based on the distinct count of fields across Company, UMR and ImportFileName:

 

I think I need to do a AVERAGE with a GROUP BY based on Company, UMR and ImportFileName but unsure how to achieve this

 

Any help would be appreciated

 

Thanks

 

Brian

  • brian0782 , Assume you have a measure [distinctCOUNT of field]

     

    Try a measure like

     

    AverageX(summarize(Table, [Company], [UMR] , [ImportFileName], "_1", [distinctCOUNT of field]),[_1])

4 Replies

  • brian0782 , Assume you have a measure [distinctCOUNT of field]

     

    Try a measure like

     

    AverageX(summarize(Table, [Company], [UMR] , [ImportFileName], "_1", [distinctCOUNT of field]),[_1])

  • harsha449's avatar
    harsha449
    Frequent Visitor

    I tried to use the meaure suggested above but it did not work. Any guidance on this.

     

    I'm trying to calculate Average based on multiple colums. data in available in the link below.

     

    https://docs.google.com/spreadsheets/d/1IZQuObUo86Q8fOxdc5zHJHsI6lDEFKvM/edit?usp=sharing&ouid=10948...

     

    Need help with measure to calculate Average_Engagement score based on two columns (company and campaign)

     

    CompanyCampaignAverage_Engagement score
    JSun25%
    JMon30%
    JTue40%
    JWed60%
    JThu70%

     

     

    Any guidance will be greatly appreciated.