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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
neskowin
Frequent Visitor

Weighted Sum

Hi, I have a large data table, call it Results, that has attributes for many "parts". I have a set of measures (call them A, B, C) that compare three systems, say X, Y nd Z in which the parts are used. I have a matrix visual that is constructed as parts x measures (parts in rows, measures in values). I also have a separate "Weights" table that has weights for each of the measure A, B and C. I want to compute a weighted sum for each part, calculated as ((Measure A * Weights A + Measure B * Weights B + Measure C * Weights C) / Sum of all weights) for systems X and Y. It is easy to do in Excel, but I am not finding an easy solution for Power BI. I'd appreciate any help from anyone here.

The matrix visual lookes like this: 
Parts         Measure A           Measure B              Measure C              Weighted Sum
a               0.93                     1.42                         1.01                          ?
b               1.37                     0.51                         1.20                          ?

The weighted sum column is what I would like to add.

Thanks

2 REPLIES 2
Anonymous
Not applicable

Hi @neskowin ,

 

The information you provided is rather vague, perhaps you could provide me with the pbix file?

 

Please be careful not to log into your account in Power BI Dektop and not to include sensitive information when uploading the pbix file.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Thank you for the prompt response. I am not able to attach my PBIX file as it is huge. Instead, I constructed an Excel sheet with sample data that illustrate my PBIX file and the desired outcome. I hope the problem description is clear. I am not able to attach the .xlsx file to this message. Hence, I have tried to copy its content below. Thank you.

 

Matrix Visual (the Value columns are measures). The measures are to be referenced in the Weight Sum.

PartsSytem X vs. System YSystem X vs. System ZSystem Z vs. System XXWeighted Sum
PartA0.9760.9251.031?
PartB0.9680.9001.042?
PartC0.9710.9101.037?
PartD0.9630.8861.048?
PartE0.9630.8881.047?

 

Weights Table

Measure NameWeight
Sytem X vs. System Y5.2
System X vs. System Z-7.1
System Z vs. System XX8.9

The "Weighted Sum" in the Matrix Visual should be as follows:
(Sytem X vs. System Y * 5.2 + System X vs. System Z * -7.1 + System Z vs. System XX * 8.9) / SUM of all weights)
The numbers used as multipliers are from the corresponding rows in the Weights Table.

 

Results Table

SystemsPartsAttribute1
System XPartA123.1
System XPartB89.7
System XPartC101.3
System XPartD77.5
System XPartE79.1
System YPartA126.1
System YPartB92.7
System YPartC104.3
System YPartD80.5
System YPartE82.1
System XXPartA129.1
System XXPartB95.7
System XXPartC107.3
System XXPartD83.5
System XXPartE85.1
System ZPartA133.1
System ZPartB99.7
System ZPartC111.3
System ZPartD87.5
System ZPartE89.1

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.