Tableau Lesson 24 – Tree Map | Dataplexa
Section III — Lesson 24

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

1
Drag Sales to the Rows shelf. Drag Sub-Category to the Rows shelf beside it. Tableau shows a bar chart. Now click Show Me and select the Treemap option — Tableau automatically reconfigures the shelves and Marks card.
2
Alternatively, clear the view and set the mark type to Square on the Marks card. Drag Sales to the Size channel and Sub-Category to the Label channel. Tableau builds the treemap tiles manually — this gives you more control than Show Me.
3
Drag Category to the Color channel. The three Categories — Furniture, Technology, Office Supplies — are now colour-coded, grouping related Sub-Categories visually even without a nested layout.
4
Drag Sales to the Label channel as well (alongside Sub-Category). In the Label editor, format it as currency with no decimals. Each tile now shows its name and its exact Sales value — essential when tiles are too small for readers to estimate size accurately.

Treemap — Labelled Mockup

SUM(Sales) by Sub-Category — Size: Sales · Color: Category
Phones
$330K
Copiers
$149K
Machines
$189K
Chairs
$328K
Tables
$206K
Bookcases
$114K
Storage
$223K
Binders
$203K
Appliances
$107K
Paper
$78K
Art
Technology
Furniture
Office Supplies
Tile size = SUM(Sales)

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.

1
Remove Category from the Color channel. Drag Profit to the Color channel instead. Tableau applies an orange-blue diverging colour scale — blue for profitable tiles, orange/red for unprofitable ones.
2
Click the Color channel → Edit Colors. Choose the Orange-Blue Diverging palette and check Use Full Color Range. Set the centre to 0 so that breakeven is a neutral white, losses are orange, and profits are blue.

Size + Color Treemap — Mockup

Size: SUM(Sales) · Color: SUM(Profit) — diverging orange–blue at zero
Phones
$330K · Profitable ✓
Copiers ✓
Machines
Tables
$206K · Loss ✗
Bookcases ✗
Chairs ✓
Storage ✓
Binders ✓
Profit colour scale:
Loss
Break-even
Profit

Treemap Strengths and Limitations

Treemap Strengths
Fits many categories into a compact space
Encodes two Measures simultaneously via Size and Color
Part-to-whole relationship is visually obvious
Hierarchical nesting groups related items naturally
Treemap Limitations
Precise size comparison is difficult — area is less readable than bar length
Small tiles lose their labels — unreadable for many items of similar size
Not suitable for tracking trends — no time axis
Readers unfamiliar with treemaps need a brief explanation
📌 Teacher's Note

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.