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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Tomek1982
Helper I
Helper I

pie chart with the legend in two columns

Hello,

 

I am strugling with most probably not that difficult pie chart creation.

Basically I have 2 tables related to investment founds:

Tomek1982_0-1697116985185.png

What I would like to see is a total percentage of shares and bonds. The result should be something like this:

Tomek1982_1-1697117092860.png

Shares percentage in this example should be (100%*100+40%*200+80%*300)/700

As I understand as a values for a piechart I should use sum of values from the left table. My question is what to use as a legend. It may be that the right table is wrong and I should use something like the one below, but then how to create a link between those two tables.

Tomek1982_2-1697118084717.png

pbix is available here

 

 

1 ACCEPTED SOLUTION
isjoycewang
Solution Supplier
Solution Supplier

Hi @Tomek1982 ,

 

Please create a new table with column "structure" and add a column with total value as below.

I modified your demo file as attached. Let me know if any questions.

 

Total Value = 
SWITCH(TRUE(),
'Structure Legend'[Stucture] = "Shares", CALCULATE( SUMX('funds structure', [shares]*[Value])),
'Structure Legend'[Stucture] = "Bonds", CALCULATE( SUMX('funds structure', [bonds]*[Value])))

isjoycewang_0-1697182630618.png

isjoycewang_1-1697182778117.png

 

 

Best Regards,

Joyce

View solution in original post

1 REPLY 1
isjoycewang
Solution Supplier
Solution Supplier

Hi @Tomek1982 ,

 

Please create a new table with column "structure" and add a column with total value as below.

I modified your demo file as attached. Let me know if any questions.

 

Total Value = 
SWITCH(TRUE(),
'Structure Legend'[Stucture] = "Shares", CALCULATE( SUMX('funds structure', [shares]*[Value])),
'Structure Legend'[Stucture] = "Bonds", CALCULATE( SUMX('funds structure', [bonds]*[Value])))

isjoycewang_0-1697182630618.png

isjoycewang_1-1697182778117.png

 

 

Best Regards,

Joyce

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors