# Treemap Plume: 11 recipes for clear, useful treemaps

> One level at a time, colors by margin, thresholds, sort, animated playback, stock map, Top N, Voronoi, small multiples and logos: common needs step by step.

- Language: English
- Web page: https://plumevisuals.com/en/tutorials/treemap-plume-cas-pratiques
- Published: 2026-10-21
- Visual: Treemap Plume, technical reference: https://plumevisuals.com/ai/visuals/treemap.md
- If an option name in this tutorial differs from the technical reference, the reference is right (it is generated from the visual's code).

Each recipe starts from the data of the [getting started guide](/en/tutorials/treemap-plume-prise-en-main) (`Sales` table, `Revenue` measure, `Region` and `Category` in **Category (groups)**). Recipes marked ★ use a premium feature: it works right away, with a "Premium preview" watermark until a key is entered.

## How do I show one level at a time, like the Power BI treemap?

With many levels (region, city, category), showing everything at once gives tiny tiles. You may prefer to go down level by level.

1. Drag `Region`, `City` and `Category` into **Category (groups)**.
2. **Format › Layout › Tiling › Levels shown at once (0 = all)**: *1*.
3. Double-click a region: its cities fill the visual. Double-click a city: its categories.
4. To go back up: the breadcrumb, the **↑** button, or the **Backspace** key.

**Result:** one level at a time, like Power BI's drill down, with a breadcrumb on top. *2* shows two levels at once (regions and cities); *0* the whole hierarchy.

## How do I color the tiles by margin rate?

Size says "how much", color says "how profitable".

1. Create the margin rate measure: `Margin rate = DIVIDE ( SUM ( Sales[Margin] ), [Revenue] )` (percentage format).
2. Drag it into **Color (measure)**.
3. The **Coloring** switches to *Gradient by a measure* by itself as long as you have not changed it; otherwise, choose it in **Format › Data colors › Coloring**.
4. Optional: **Start value (empty = minimum)** and **End value (empty = maximum)** to fix the scale (for example `0.2` and `0.6`), so that colors do not change when you filter.
5. The gradient colors come from the style; **Format › Style › Custom colors** lets you pick the start, middle and end.

**Result:** a gradient legend at the top of the visual; the most profitable tiles take the end color. The tooltip also gives the rate.

## How do I show the variance to a target, above and below ★

1. Create a variance measure, for example `Variance to target % = DIVIDE ( [Revenue] - [Target], [Target] )`, and drag it into **Color (measure)**.
2. **Coloring**: *Diverging around a midpoint ★*; **Midpoint value**: `0`.
3. Tiles above the target take one side of the style's diverging gradient, tiles below the other side, tiles close to 0 the middle color.

## How do I sort tiles into three tiers ★

1. Drag the measure to classify into **Color (measure)** (for example the average basket).
2. **Coloring**: *Thresholds (3 colors) ★*.
3. **Low threshold**: `150`; **High threshold**: `200`. Colors: **Below the low threshold**, **Between thresholds**, **Above the high threshold**.

**Result:** a three-tier legend (below 150, from 150 to 200, above 200), and each tile in the color of its tier.

## How do I sort by name, or in month order?

1. **Format › Layout › Tiling › Tile order**: *Name (A → Z)* for alphabetical order (natural: "Item 2" before "Item 10").
2. For a business order (months, priorities): sort the column by another one in the model (**Column tools › Sort by column**), then choose *Data order (Power BI sort)*.

The first tile is always at the top left; with *Squarified*, the next ones are laid out in rows.

## How do I animate the treemap from one year to the next ★

1. Drag a `Year` column (or a date) into **Play axis ★**. A play bar appears below the treemap, with the year in large type.
2. Click **▶**: tiles grow, shrink and slide from one year to the next.
3. **Format › Layout › Stable layout while playing** (on by default) keeps each tile in its place: nothing jumps, you can follow a category with your eyes.
4. **Format › Playback ★**: duration of a frame, loop, play automatically on opening, frame shown on opening (*The first one* for a report that opens on 2023).

**Result:** a smooth animation; the **Space** key starts or stops playback when the bar has the focus, the arrows move from one year to the next. "Reduce motion" (**Format › Style › Animations**) jumps without transitions.

## How do I build a stock map: up in green, down in red ★

1. Drag the current value into **Values** (for example `Revenue 2025`) and the comparison value into **Comparison** (for example `Revenue 2024`: `CALCULATE ( [Revenue], Sales[Year] = "2024" )`).
2. **Coloring**: *Stock map: change (Comparison field) ★*.
3. The color range sets itself: with **Automatic change range** (on), the strongest color matches a round change reached by 90% of the tiles. To fix it, turn it off and set **Change for the strongest color (%)**: `3` for stock prices, `15` for annual revenue.
4. If a decrease is good news (costs, delays), turn on **A decrease is favorable**.

**Result:** each tile shows "▲ +12%" or "▼ −5%" below its value (**Format › Data labels › Change ▲▼ (Comparison field)**), the color goes from unfavorable to favorable through gray, and the tooltip gives the comparison value.

## How do I color a stock map with another measure ★

The size of the tiles follows one measure (revenue, a market cap) and the color a change you already compute, for example revenue growth.

1. Keep `Revenue 2025` in **Values** and empty the **Comparison ★** field.
2. Drop the change measure in **Color (measure)**, for example `Growth = DIVIDE ( [Revenue 2025] - [Revenue 2024], [Revenue 2024] )` with a percentage format.
3. **Format › Data colors › Coloring**: *Stock map: change (Comparison field) ★*, then **Change read from**: *Color field (change already computed)* (the *Automatic* choice does it too when the Comparison field is empty).

**Result:** the area follows revenue, the color follows growth, with a ±x% legend. A measure with a percentage format or between -1.5 and 1.5 is read as a fraction (0.034 = 3.4%); a measure in points (3.4) is read as 3.4%.

## How do I keep the 10 largest products of each region ★

1. Drag `Region` then `Product` into **Category (groups)**.
2. **Format › Layout › Top N and "Others"**: turn on **Top N + "Others" ★**, **Tiles kept per group**: `10`.
3. Optional: **"Others" label** ("Other products").

**Result:** in each region, the 10 largest products and a hatched "Others" tile adding up the rest. Clicking "Others" selects all merged products; the tooltip names them.

## How do I draw the treemap inside the map of France ★

1. **Format › Layout › Tiling method**: *Voronoi (cells) ★*.
2. **Voronoi shape**: *Metropolitan France* (★), or a free shape (*Circle*, *Hexagon*, *Heart*…).
3. With two levels, a legend names the groups (cells of the same group share a color and a thicker border).

**Result:** polygonal cells whose area stays proportional to the values (within 1%). Above 1,200 cells, the visual falls back to the squarified tiling and says so in edit mode.

## How do I compare several stores side by side ★

1. Drag `Store` (or `Channel`) into **Small multiples ★**.
2. **Format › Small multiples › Comparable areas across panels** (on by default): each panel's area is proportional to its total.
3. **Columns (0 = automatic)** to force the grid.

## How do I put a logo in each tile ★

1. Add a text column holding the image in base64 (`data:image/png;base64,…`): in Power Query, `Binary.ToText ( [Content], BinaryEncoding.Base64 )` on a folder of images, then the prefix.
2. Drag this column into **Image ★** (Power BI summarizes it as *First*).
3. **Format › Images ★**: *Whole (logo)* or *Fill the tile (photo)*, size, opacity, round image.

Web addresses (`https://…`) are never loaded (Microsoft rule for certified visuals): a message explains it in edit mode. Power BI cuts a column text around 32,766 characters: for a heavier image, split it into 30,000-character chunks in Power Query (one row per chunk, with its number), then join them back with a measure dropped in **Image ★**:

```dax
Logo = CONCATENATEX ( Images, Images[Chunk], "", Images[Chunk index], ASC )   -- joins the chunks back in order
```
