Skip to content
Tutorials Center
My learning

Topics

Lesson 10 of 35 ยท Building Views

Tableau Pie, Treemap, Bubble, Funnel and Waterfall Charts

Build part-to-whole charts in Tableau: pie, treemap, packed bubble, funnel and waterfall. Learn the shelves, when each chart helps and see the numbers behind them.

When the question is "how does the total split up?" or "how does a number change from start to finish?", you need a part-to-whole or flow chart. This lesson builds five of them in Tableau: pie, treemap, packed bubbles, funnel and waterfall. Each has a recipe, a note on when to use it, and a stand-in that computes the same numbers with SQL.

Pie chart

Use it for: two to five parts of one total, when the exact values matter less than "about a third".

  1. Drag Category to Color and SUM(Sales) to Angle on the Marks card. Change the mark type to Pie if Tableau did not already.
  2. Drag SUM(Sales) to Label and choose Quick Table Calculation > Percent of Total to print percentages.
  3. Increase the size of the pie with Ctrl+Shift+B (bigger) or with the Size slider.

Rules for readable pies: no more than five slices, sort them by size, start the largest slice at twelve o'clock and never use a 3D pie. When values are close, a bar chart is more accurate, because people compare lengths better than angles.

SQL Stand-in: slice size and percent of total

Press Run (or Ctrl + Enter) to see the result here.

Treemap

A treemap shows hierarchy and size with nested rectangles: the area is a measure, the color is another measure or a dimension.

  1. Drag Category and then Sub-Category to Detail (or Color).
  2. Drag SUM(Sales) to Size and SUM(Profit) to Color.
  3. Choose Show Me > treemap, or set the mark type to Square.

Treemaps pack many categories into a small space, and they work when you have dozens of members. They are poor for exact comparison, so add labels and a tooltip. With a diverging color on Profit you can see big-but-unprofitable areas at once.

SQL Stand-in: two measures for a treemap

Press Run (or Ctrl + Enter) to see the result here.

Machines is large but loses money, which would appear as a big red rectangle. That is the story a treemap tells well.

Bubble chart (packed bubbles)

A packed bubble chart shows each member as a circle whose size is a measure, packed together with no axes.

  1. Drag Sub-Category to Detail or Label.
  2. Drag SUM(Sales) to Size and again (or SUM(Profit)) to Color.
  3. Choose Show Me > packed bubbles; Tableau sets the mark type to Circle and arranges them.

Use it for a playful overview or a handful of categories. For precise ranking a sorted bar chart is better. When you want bubbles with axes, build a scatter plot with Size.

Funnel chart

A funnel shows how a population shrinks across stages, for example Visited > Signed up > Purchased > Renewed. Tableau has no funnel mark type, so you build it from bars.

Simple funnel (centered bars):

  1. Put the stage dimension on Rows, sorted by stage order (use a Manual sort or sort by a numeric stage field).
  2. Create a calculated field Centered start = -SUM([Customers]) / 2 and drag it to Columns.
  3. Change the mark type to Gantt Bar and drag SUM(Customers) to Size. Each bar now starts at minus half its length and extends by its full length, so it is centered on zero and looks like a funnel.
  4. Add the stage conversion as a label with a table calculation: SUM([Customers]) / LOOKUP(SUM([Customers]), FIRST()) (computed along the stages).

The traditional funnel is the same idea drawn as two mirrored bar charts side by side (one axis reversed). In both versions the number that matters is the conversion between stages.

SQL Stand-in: stage conversion and overall conversion

Press Run (or Ctrl + Enter) to see the result here.

pct_of_first is SUM(customers) / LOOKUP(SUM(customers), FIRST()), and pct_of_previous is the same with LOOKUP(..., -1). Both are table calculations computed down the stage dimension. See Table calculations.

Waterfall chart

A waterfall shows how a starting value changes through a series of increases and decreases to an end value, for example a monthly profit bridge.

  1. Put a dimension (Sub-Category or Month) on Columns and SUM(Profit) on Rows.
  2. Right-click SUM(Profit) > Quick Table Calculation > Running Total. Tableau needs the running total as the base of each bar.
  3. Change the mark type to Gantt Bar.
  4. Create a calculated field Negative Profit = -SUM([Profit]), and drag it to Size. A Gantt bar starts at the running total and extends by the size, so a negative size stretches the bar back to the previous total.
  5. Color by SUM(Profit) > 0 (a calculated boolean) to show increases and decreases in different colors.

The effect: each bar starts where the previous one ended.

SQL Stand-in: start, end and running total of a bridge

Press Run (or Ctrl + Enter) to see the result here.

bar_start is where Tableau's Gantt bar begins; the bar's length is the amount. The last bar_end (620) is the closing value, which you can add as a final total bar.

The exact calculated fields for waterfalls and funnels vary by author. The principle is constant: a Gantt bar needs a start (a running total) and a length (the step value). If your waterfall looks wrong, check the sign of the size.

Choosing a part-to-whole chart

flowchart TD
    A["Part-to-whole question"] --> B{"How many parts?"}
    B -->|"2 to 5"| P["Pie or stacked bar"]
    B -->|"Many, with hierarchy"| T["Treemap"]
    B -->|"Many, no axes needed"| BB["Packed bubbles"]
    A --> C{"Stages or changes?"}
    C -->|"Shrinking stages"| F["Funnel"]
    C -->|"Increases and decreases"| W["Waterfall"]

Start with the question, then choose the chart.

Common mistakes

  • Pie charts with ten slices. Use a bar chart.
  • Treemaps without labels, so nobody can tell which box is which.
  • Waterfall bars floating in the wrong place because the table calculation is computed along the wrong dimension.
  • Funnels with unsorted stages.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which Marks card option controls the size of a pie slice?

    Pie marks use Angle for the measure that sets each slice's size, and Color usually carries the dimension.
  2. 2. Which two measures commonly define a treemap's rectangles?

    The area encodes one measure (Size) and the color a second measure or dimension.
  3. 3. What does a Gantt bar need to draw a waterfall step?

    Gantt bars begin at an axis value and extend by the Size field, which is how waterfalls are built.
  4. 4. What is conversion between stages in a funnel?

    Stage-to-stage conversion shows where people drop out and is computed with a LOOKUP table calculation.

Summary

  • Pies suit two to five parts; treemaps handle hierarchies; packed bubbles are an overview.
  • Funnels need ordered stages and a conversion percentage.
  • Waterfalls use a Gantt bar with a running-total start and a signed size.
  • The numbers behind these charts are percent-of-total, running totals and lookups: table calculations.

Next: Maps in Tableau