Sub topic 6
Showing parts of a whole
This chapter assumes you can build a basic visual in Power BI Desktop, you have a model with related tables, and you know sum, average and count. It covers visuals that answer the question "how much of the total does each part contribute?"
Start with a share measure
Composition visuals need a value for each part. Many of them also work better when you show each part's share of the total. This measure divides the current category's sales by sales across all categories:
Sales % of Total =
DIVIDE (
[Total Sales],
CALCULATE ( [Total Sales], ALL ( Product[Category] ) )
)ALL ( Product[Category] ) removes the category filter, so the denominator is the grand total. DIVIDE returns blank instead of an error when the denominator is zero or blank. Format the measure as a percentage.
Choose a visual by the number of parts
| Visual | Best for | Limit |
|---|---|---|
| 100% stacked bar | Comparing the mix across a few groups | Only the first and last segments share a baseline |
| Stacked bar or column | Totals and parts together | Middle segments are hard to compare |
| Donut | 2 to 4 parts of one total | Angles are hard to judge, and many slices clutter it |
| Treemap | Many parts, with one clear level of hierarchy | Precise comparison is weak |
| Waterfall | How increases and decreases bridge a start value to an end value | Needs an ordered set of steps |
| Bar chart sorted by share | Ranking parts accurately | Does not show the "whole" visually |
If the reader must compare exact sizes, use a bar chart sorted by Sales % of Total. Length on a common baseline is easier to read than angle or area.
Build a treemap
- Add a Treemap visual.
- Put
Product[Category]in Category. - Put
[Total Sales]in Values. - Add
Product[Subcategory]to Details if you want a second level. - Add
[Sales % of Total]to Tooltips so hovering shows the share.
Build a waterfall
A waterfall works when the categories form steps between two values, such as profit drivers from revenue to net income. Put the step names in Category and the measure in Y Axis. Use Breakdown to split a step by another field. Totals appear as the first and last bars when your data includes them.
Common errors
- Too many slices. A donut with 8 or more slices is unreadable. Group small parts into "Other" or switch to a sorted bar.
- Negative values. Donut and treemap cannot show negative parts. Use a waterfall or bar chart.
- Percentages that do not sum to 100. A slicer or filter may remove part of the whole. State what the whole is in the title, for example "Share of 2025 sales".
- Share measure shows 100% everywhere. The denominator is filtered to the same category. Check that
ALLnames the same column used in the visual's axis. - Color without order. Sort slices by value so the reader can find the largest part.
Exercise
A report page shows sales across 12 product subcategories. A manager wants to know which three contribute the most. Which visual and measure do you use, and why not a donut?
Show answer
Use a bar chart with Subcategory on the axis and a share measure such as Sales % of Total (DIVIDE of Total Sales by Total Sales with ALL on the Product category or subcategory column) in Values, sorted descending. Bars share a baseline, so lengths are easy to compare and ranking is exact. A donut with 12 slices relies on angles, is cluttered, and makes close values hard to tell apart.