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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Super User
Super User

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
Super User
Super User

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.