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
Anonymous
Not applicable

Excluding responses changing percentage

Hi,

 

I am trying to create a graph that shows the percentage of people choosing each sport as their favourite out of all people who do at least 1 sport. My column 'Fav Combined' has favourite sport for each participant (one per participant and blank if no sport is done at all by the person). I also have a binary variable with 0 if a person does not do any sport and 1 if they do. 

 

After creating a visual with Fav Combined in both the x and y axis and choosing the option to show as the percentage of total, I am running into an issue where if I exclude one of the sports because of a small sample, all of the percentages change because of it being excluded from the calculations. 

 

How can I create a graph which is unaffected by excluding sports? I have tried creating new measures but can't get it right.

julias_0-1700049130551.png

 

Thanks for your help!

Julia

1 ACCEPTED SOLUTION
sjoerdvn
Super User
Super User

You haven't shared much information on all tables and columns involved, but I would create two measures, one for the count and one for the average, something like this:

# FAV Combined = COUNT(tbl[Fav Combined])

% Fav Combined = DIVIDE([# FAV Combined]
  , CALCULATE( [# FAV Combined], ALL(tbl[sport]))

View solution in original post

1 REPLY 1
sjoerdvn
Super User
Super User

You haven't shared much information on all tables and columns involved, but I would create two measures, one for the count and one for the average, something like this:

# FAV Combined = COUNT(tbl[Fav Combined])

% Fav Combined = DIVIDE([# FAV Combined]
  , CALCULATE( [# FAV Combined], ALL(tbl[sport]))

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.