# Pyramid Plume: 10 use cases for age pyramids

> Step by step: bands with no sort column, grouped ages, playing years, following the baby boom generation, areas compared in %, indicators, projections, butterfly.

- Language: English
- Web page: https://plumevisuals.com/en/tutorials/pyramid-plume-cas-pratiques
- Published: 2026-10-21
- Visual: Pyramid Plume, technical reference: https://plumevisuals.com/ai/visuals/population-pyramid.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).

These recipes start from a Pyramid Plume already in place. If that is not the case, begin with [getting started](/en/tutorials/pyramid-plume-prise-en-main): the examples reuse its `Population` table and its `Number of residents` measure. Features marked ★ are premium: they work without a license, with a watermark.

## How to sort text age bands with no sort column?

Your bands are called "0 to 4", "5 to 9"… "100 and over", and Power BI sorts them alphabetically ("10 to 14" before "5 to 9").

1. Drag the band column as it is to **Age (or age band, category)**.
2. Keep **Format › Ages and categories › Order** = *Automatic (ages in numeric order)*.

Result: the visual reads the first number of each label and puts "0 to 4" at the bottom, "100 and over" at the top. It also understands "85+", "90 ans et +", "under 5" and the Eurostat codes `Y_LT5`, `Y5-9`, `Y_GE85`.

## How to group single ages into 5-year bands? ★

Your data has one row per age (0, 1, 2… 100) and the pyramid is too thin for a small visual.

1. **Format › Ages and categories › Group ages** = *5-year bands ★*.
2. **Open last band from (0 = no) ★** = `90`.

Result: 19 rows, from "0–4" to "85–89", then "90+". Totals do not change. No calculated column is needed, and the median age is still computed precisely (uniform spread inside each band).

## How to play the years like the animated pyramids of statistics offices? ★

1. Drag the year (whole number or date) to **Play axis ★**.
2. **Format › Playback ★ › Playback › Frame shown on opening** = *The first one* to start at the beginning; **Duration of a frame (ms)** = `800`; turn on **Loop**.
3. Keep **Format › Pyramid › Scale › Same scale for every frame of the play axis** on: a growing population takes more room.
4. Click ▶. With the keyboard: Space to play or pause, arrows to move one year.

Result: bars, totals, labels and median age glide from one year to the next. Playback is never saved in the report: every reader starts from the opening year.

## How to follow the baby boom generation while playing? ★

1. Turn on **Format › Generations ★ › Follow a generation ★**.
2. **Born in (or from)** = `1946`, **To (0 = a single year)** = `1964`, **Label** = `Baby boomers`.
3. Check **Format › Ages and categories › Age counted as**: *Age reached during the year* (born in 1946: 74 in 2020) or *Completed age on January 1* (73 on January 1, 2020, the convention of the French statistics office).
4. Click ▶.

Result: a colored band surrounds the ages of the baby boomers with "Baby boomers · ages 56–74" in 2020, and climbs from one year to the next. Without a play axis, set **Ages and categories › Observation year**.

## How to mark notable generations (wars, baby boom)? ★

1. **Format › Generations ★ › Markers ★** = `1915-1919 = WWI birth deficit; 1946-1964 = Baby boom`.
2. To read the birth year next to each age: turn on **Format › Category axis › Birth years alongside** (free).

Result: a light band and a label at the age of each generation, following the years while playing. A badly written marker is reported in edit mode.

## How to compare an area with the whole country, despite their different sizes? ★

1. Create a measure that ignores the area:

```dax
Residents of all areas = CALCULATE ( [Number of residents], REMOVEFILTERS ( Population[Area] ) )
```

2. Drag it to **Comparison ★**.
3. **Format › Pyramid › Show** = *% of the total population*.
4. Filter one area with a slicer.

Result: the bars show the area, the step outline shows the whole country, each as a % of its own population: you compare shapes, not sizes. **Format › Comparison ★ › Drawing** also offers *Ghost bars behind* and *Marker at the end of each bar*.

## How to keep the 1975 pyramid as an outline while playing? ★

1. **Format › Comparison ★ › Compare with** = *Named frame of the play axis*, **Frame (e.g. 1975)** = `1975` (or *First frame of the play axis*).
2. Click ▶.

Result: the 1975 pyramid stays drawn as an outline while the years play. *Previous frame of the play axis* shows the year before instead, to see what changes at each step.

## How to show the median age and demographic indicators? ★

1. **Analytics › Median and mean age ★ › Median age ★** on (one line per side, or **Computed for** = *Everyone*).
2. ★: turn on **Format › Demographic indicators ★ › Show**; pick the indicators and thresholds (**Young: under (years)** `20`, **Older: from (years)** `65`).

Result: a box at the top left gives the population, the median age, the shares of young and older people, the dependency ratio (young and older people per 100 people of working age); everything updates with each year.

## How to tell projections from observed years? ★

1. Turn on **Format › Projection ★ › Mark projections**, **Projection from** = `2025`.
2. **Bar drawing** = *Hatched* (or *Pale*, *Dashed outline*).

Result: from 2025 on, bars are hatched and a "Projection" tag shows at the top of the chart; it is also added to the year in the tooltip.

## How to build a butterfly or tornado chart with two measures?

1. Remove the **Side** field.
2. Drag two measures to **Value** (e.g. `Satisfied managers` and `Satisfied employees`) and a column of criteria to **Age (or age band, category)**.
3. Tornado: **Format › Ages and categories › Order** = *Total, descending (tornado)*.
4. Measures with different units (headcount and seniority): **Format › Pyramid › Scale › Scale of both sides** = *Own scale per side (two measures)*.
5. So that tooltips and indicators don't talk about "age": **Format › Ages and categories › Wording** = *Neutral (categories, values)* (the *Automatic* setting already does it when the field is not about age).

Result: both measures face each other, the largest at the top; the header shows each measure's name (with no total when they are percentages). For one pyramid per region, drag the region to **Small multiples ★**; to split nationalities inside each bar, drag them to **Sub-category ★**.

## How to show the surplus of women at old ages? ★

At old ages, women outnumber men: the part of their bar beyond the men's bar tells the gap in life expectancy.

1. **Format › Pyramid › Bars › Surplus of one side** = *Hatching at the end of the bar ★*.
2. Leave **Surplus legend** on: a "Surplus" key appears under the pyramid.
3. Optional: **Format › Data colors › Surplus** for a color other than the side's shade.

Result: the end of the bars that goes beyond is hatched in the side color, with an outline: it is no longer read as a second series. *Outline of the opposite side ★* draws the outline of the opposite bar instead.

## How to keep the same scale when filtering?

A slicer (a region, an area of your data) changes the total: the scale refits and two selections can no longer be compared at a glance. Pin the maximum with a measure that ignores this filter.

1. Create the measure:

```dax
Pyramid maximum =
CALCULATE (
    MAXX ( VALUES ( Population[Band] ), [Number of residents] ),  -- the largest bar…
    REMOVEFILTERS ( Population )                                  -- …computed without any filter
)
```

2. Drag it into **Dynamic format**, then rename it for this visual `pyramid.max` (the **Pyramid › Scale › Scale maximum** setting).
3. Filter: the scale no longer moves. With a play axis, **Same scale for every frame of the play axis** (on by default) already keeps the same scale from one year to the next.

Don't use `ALLSELECTED ()`: it follows slicers, so the scale would still move. To ignore just one filter, remove only the filtered column.
