Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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.
Thanks for your help!
Julia
Solved! Go to Solution.
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]))
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]))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |