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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jimrob
Frequent Visitor

Combining weights from two tables to calculate a weighted percentage to show in a stacked bar chart

Hi!

Sorry if this is already answered somewhere, I couldn't find it or didn't know what to search for.
I would like to aggregate data from one table using weights from another table in order to show the overall exposure. Below I have provided an example:


I am looking to acheive this desired result (manually created in excel to demonstrate):

jimrob_2-1656495832815.png

I have two tables - one of Portfolios, which each hold mulitple securities, with Weights that sum to 100 for each Portfolio. And one of Securities, which each have one or more geographical exposures, which sum to 100. (In Power BI I have created a many to many relationship between the tables by Security ID.)

 

A table of portfolios with the weight of each security:

 

Portfolio IDSecurity IDWeight
123456Fund A20%
123456Fund B40%
123456Fund C40%
987654Fund A10%
987654Fund C50%
987654Fund D40%

 

A table of securities with the weight of each geography:

 

Security IDGeographyWeight
Fund AUSA50%
Fund AEurope20%
Fund AUK10%
Fund AAsia20%
Fund BUSA90%
Fund BUK10%
Fund CEurope80%
Fund CUK20%
Fund DAsia100%

 

What type of relationship or measure or changes to the way the data is stored do I need in order to achieve the above?

Thanks in advance!

 

2 REPLIES 2
amitchandak
Super User
Super User

@jimrob , Merge these in power query and multiple their Weight and create a new column 

 

Merge: https://radacad.com/append-vs-merge-in-power-bi-and-power-query

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

Thanks @amitchandak !

 

I presume you mean a new column for each geography? Unfortunately in the real data that would be many many columns.

 

I was hoping there is a way to establish the relationship more dynamically.

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