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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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