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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Calculate Complex Average calculation with weight from four tables

parameshulthi_0-1594627644960.png     parameshulthi_1-1594627685622.pngparameshulthi_2-1594627713148.png

 
 

Capture.PNG 

Actually understanding the requirement is itself difficult just by reading.

I want to calculate average of scores each branch with weight from subject table for all the titles in Result table like below

Average for each branch =Sum of all (sum of scores for each weight * weight) for each branch/sum of weights for all the titles of that branch

 

For example for branch id 2 it's,

Sum of scores for weight 4 ( subject id 3) is 10 and sum of scores for weight 5 (subject id 4 and 5) is (2+1+2+3)=8

So there are 5 titles in result table for branch id 2

Average score for branch 2 = {(10*4)+(8*5)} / {(4)+(5*4)} = 3.33

 

I know it's little difficult to understand 

 
 

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Create two columns Related to TitleScore and Weight in Result table

Weight = Related (Subject [Weight])

TitleScore = Related (Score [score])

Create another column weight * Titlescore as below

Weight * Titlescore = Result [ Weight] * Result [TitleScore]

Create measure as shown below

average scores =Sum(Result[Weight*Titlescore])/Sum(Result[weight])

Use this measure in table with branchname to get average scores of each branch

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Create two columns Related to TitleScore and Weight in Result table

Weight = Related (Subject [Weight])

TitleScore = Related (Score [score])

Create another column weight * Titlescore as below

Weight * Titlescore = Result [ Weight] * Result [TitleScore]

Create measure as shown below

average scores =Sum(Result[Weight*Titlescore])/Sum(Result[weight])

Use this measure in table with branchname to get average scores of each branch

AntrikshSharma
Super User
Super User

"Sum of scores for weight 4 ( subject id 3) is 10" shouldn't the score be 20?

You can refer to the PBI file at https://drive.google.com/file/d/1Pqa7WJ3Hnfobl9f5BvQfS9cIb5ph7SwH/view?usp=sharing

amitchandak
Super User
Super User

@Anonymous , Can share the same logic along with data in an excel workbook

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Sure @amitchandak 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors
Top Kudoed Authors