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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
RHamilton
Frequent Visitor

Chart - Percentages of Selected Group

Hello PBI Community, 

Im a bit stuck on configuring percentages. 🤔 and have spent hours trying to figure it out. 😑

I have a simple matrix and when I click on a row, I would like to show the percentage of the ROW. 

 

By defaut, PBI gives a percentage of the whole group as shown below

 

Here in the first image the counts are correct  (simple count measure) but the percentages are of the whole dataset

I would expect here

 

34/160 = 21%

126/160 = 79%

 

PBI-1.JPG

 

 

So I created a divide measure...and now the percentages are correct but how do I get the correct counts to show?

 

PBI-2.JPG

 

Many Thanks in advance!  I hope this helps others also.

1 ACCEPTED SOLUTION

Hey @RHamilton,

 

If I have understood you right, you just need to edit the interactions to achieve your desired result.

 

Here's the Screenshot

Microsoft.png

 

 

Here's my File

https://1drv.ms/u/s!AsLz0i2VASN1oJwcDFQf7oN87ZtPpw?e=2GK8ge

View solution in original post

6 REPLIES 6
JosefPrakljacic
Solution Sage
Solution Sage

Hey @RHamilton,

 

may I ask you to post a short demo data table?

 

BR,

Josef

Hello @JosefPrakljacic 

 

Thanks for your reply. See the image. Hopefully you'll get the idea? 

There is a row per department.

 

PBI-3.JPG

Hi @RHamilton ,

Can you please share the sample data table not the matrix?  And Please share the formulas that you tried. Then we will understand clearly.

 

Here is my sample. Maybe you could reference it to have a  try firstly.

%Government = 
var Government = CALCULATE(SUM('Table'[Sales]),FILTER('Table','Table'[Segment] = "Government"))
var Total = CALCULATE(SUM('Table'[Sales]),ALLSELECTED('Table'))
return
DIVIDE(Government,Total)

1.PNG

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-xuding-msft ,

 

Many thanks for your reply.

Sorry, I do not see a way to upload/attached a file other than an image. 

 

Based on your response, I think maybe the only way to accomplish what I need to create a summary table of my larger table and then take the same approach as you did below. Unless there is a better way using the dataset as I have provided without any intermediary summary steps?

 

Here is what my data looks like, again sorry but I do not see a way to upload the actual Excel file.

 

PBI-4.JPG

 

 

Hey @RHamilton,

 

If I have understood you right, you just need to edit the interactions to achieve your desired result.

 

Here's the Screenshot

Microsoft.png

 

 

Here's my File

https://1drv.ms/u/s!AsLz0i2VASN1oJwcDFQf7oN87ZtPpw?e=2GK8ge

@JosefPrakljacic , Thank you!  👍 Wow....something so simple and small - so hidden away on the top of the chart. It just says 'filter'. Oh well, not even sure what it means in the context of the interaction but it worked. I'll look it up later.

 

You've really made my day!

 

Best Wishes, 😁

 

 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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