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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Weighted Average Of Varaince

I am working on a weighted average problem that I am stuck on. It is a little different than most weighted average questions I have read on here so I am going to be very specific with what I am looking for. I have made a mock data set to illustrate the problem. 

 

PersonSubjectGrade
BobMath22
BobEnglish45
BobMath38
BobMath86
BobEnglish54
BobScience34
SarahMath56
SarahScience75
SarahEnglish34
SarahMath22
SarahEnglish63
SarahScience22

 

Here is the data set, a class room of 2 students and their attempts on test for different subjects. Now I want to find the variance of a students grades compared to the class average in this way. Lets say it was looking at bobs grades:

 

SubjectNumber Of TriesBobs Average GradeClass Average Grade
Math348.744.8
English249.549
Science13443.7

 

SubjectWeightGrade DifferenceWeight * Difference
Math0.53.91.933333333
English0.330.50.166666667
Science0.17-9.7-1.611111111

 

 

So the weight for math is 3 / the total number of attempts, 6 for .5. The difference is Bobs average grade - the class average. 

And then you multiply them together for the variance (weight * difference). Summing all these variances together gives you .48. This is the number I want to return. 

 

Can any provide guidance? I feel like I have gotten close but can never return the expected numbers. 

 

 

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

3 REPLIES 3
lbendlin
Super User
Super User

like this?

lbendlin_0-1714688751256.png

 

Anonymous
Not applicable

Yes! I transfered this over to my dataset and with a few small tweaks it works! Thank you so much. If you have time I would love a breif explanation for what your "result" measure is doing. What is that "r" parts purpose? 

it's a random name for the column we need to add to the Values list in order to materialize the measure calculation.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.