Forum Discussion

mel189's avatar
mel189
Regular Visitor
4 years ago

Weighted average score

***EDITED to include more information

 

Hello community 🙂 

 

I am currently working with some survey data to create a PowerBI report. The data is weighted by several demographic variables. I would like to calculate mean scores, however not sure how to do this to create a report that is reflective of the weighting. Dummy data below.

 

The output I would like is a simple average score:

 

Average of Score1 = X

Average of Score2 = X

Average of Score3= X.....

 

But I would like to be able to filter it by Gender, Industry and Age group

 

IDWeightGenderIndustryAge groupScore1Score2Score3Score4Overall score
10.769148582MaleHealth18 - 2468.868.859.466.365.8
21.646973984MaleInformation Technology18 - 24100.096.964.367.482.2
30.908653866MaleTransport18 - 2459.459.475.064.864.6
41.179551736MaleFinance18 - 2475.081.378.182.579.2
51.539003936MaleHealth25 - 3450.068.850.055.456.0
60.797782928MaleInformation Technology25 - 3459.475.062.555.663.1
70.860841122MaleTransport25 - 3475.062.560.763.665.5
80.688758334MaleFinance25 - 3428.132.171.963.849.0
90.987520537MaleHealth35 - 4493.8100.068.875.684.5
100.569148582MaleInformation Technology35 - 4468.875.062.553.164.8
114.000000000MaleTransport35 - 4478.181.350.039.462.2
120.653696256MaleFinance35 - 4462.575.068.875.070.3
131.631421649FemaleHealth18 - 2471.965.665.660.065.8
140.681652090FemaleInformation Technology18 - 2468.850.053.158.857.7
151.321545102FemaleTransport18 - 2481.387.581.371.980.5
160.582127359FemaleFinance18 - 2450.075.081.390.674.2
171.360796946FemaleHealth25 - 3434.487.550.050.055.5
181.287520537FemaleInformation Technology25 - 3471.971.950.050.060.9
190.669148582FemaleTransport25 - 3446.964.378.181.367.6
202.804766145FemaleFinance25 - 3481.365.675.075.074.2
210.830279756FemaleHealth35 - 4450.050.050.050.050.0
221.681729157FemaleInformation Technology35 - 4462.565.653.139.355.1
230.747406699FemaleTransport35 - 4450.062.568.871.963.3
241.800526115FemaleFinance35 - 4446.946.987.571.963.3

 

 

Thank you, 

Mel

4 Replies

  • This is a standard pattern -  find the sum of all the variables multiplied by their weight, then divide by the sum of the weights.

     

     

  • mel189's avatar
    mel189
    Regular Visitor

    Thank you, that's helpful!

     

    However I also need to filter by multiple other categorical variables (e.g. gender, industry) and this doesn't seem to be coming up with accurate mean scores, because the current calculation doesn't take into account the weighted counts

    • lbendlin's avatar
      lbendlin
      Super User

      Please provide sanitized sample data that fully covers your issue.

      Please show the expected outcome based on the sample data you provided.