Tableau Course
Treemaps
A treemap fills a rectangle with nested tiles — each tile's size proportional to a Measure, each tile's colour encoding a second Measure or Dimension. The result is a compact part-to-whole view that shows both individual magnitude and collective composition at once.
Treemaps — Part-to-Whole at a Glance
A treemap is designed to answer two questions simultaneously: which items are the largest, and how do all items add up to a whole? Every tile in a treemap is a member of the Dimension placed on the Detail or Label channel. The tile's area is proportional to the Measure on the Size channel. The total area of all tiles equals 100% of the data — making it an ideal chart for part-to-whole communication when you have too many categories for a pie chart and too much hierarchy for a simple bar chart.
Treemaps are especially effective when you have a two-level hierarchy — such as Category containing Sub-Categories — because the nesting naturally groups related tiles together inside a larger parent rectangle.
Building a Treemap — Step by Step
Treemap — Labelled Mockup
Using Color as a Second Measure
The real power of a treemap comes when Size and Color encode different Measures. Size shows Sales — how much revenue each Sub-Category generates. Color shows Profit Ratio — how profitable each Sub-Category is. This combination instantly surfaces the most dangerous business situation: a large tile (high revenue) in a cold or red colour (low or negative profit). That Sub-Category is generating a lot of sales but losing money.
Size + Color Treemap — Mockup
$330K · Profitable ✓
$206K · Loss ✗
Treemap Strengths and Limitations
The treemap's killer combination is Size = Revenue and Color = Profit Ratio. This is the single most efficient chart for a product portfolio review — one view shows you the big revenue drivers (large tiles) and flags the ones losing money (orange/red colour) simultaneously. Without a treemap, you need two separate bar charts to see both dimensions at once, and your audience has to mentally combine them. With a treemap, the insight is instantaneous. Tables in Superstore is always the standout — a large orange tile surrounded by blue ones. That one tile tells the business story in a single glance. Always add labels with exact values to the tiles, and always choose a diverging colour palette centred at zero when Profit is on the Color channel.
Practice Questions
1. In a treemap, which Marks card channel controls the area of each tile?
2. When building a treemap manually instead of using Show Me, what mark type do you select on the Marks card?
3. Profit is placed on the Color channel of a treemap. Which colour palette setting makes the chart most readable for spotting loss-making tiles?
Quiz
1. An executive wants a single chart showing which product sub-categories generate the most revenue and which ones are losing money. Which approach is most efficient?
2. A treemap and a bar chart both show Sales by Sub-Category. What is the key readability disadvantage of the treemap compared to the bar chart?
3. A treemap shows one tile per Category — three tiles total. You want to break each Category tile into its Sub-Category tiles while keeping the Category colour grouping. What do you add to the Marks card?
Next up — Lesson 25: Heat maps — using a colour grid to reveal patterns across two categorical dimensions at once.