Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 35 ยท Building Views

Tableau Crosstabs, Totals, Combination, Lollipop, Bullet and Gantt Charts

Build Tableau crosstabs with row and column totals, highlight tables, dual-axis combination charts, lollipop charts, bullet graphs and Gantt charts, with runnable stand-ins.

This lesson collects the remaining everyday views: the crosstab (a table of numbers), totals, the dual-axis combination chart, and three special charts built from tricks: lollipop, bullet and Gantt. They all rely on ideas you have met: dimensions and measures on shelves, mark types, and a second axis.

Stand-ins use SQL or Python on small tables and are not Tableau; they show the numbers each chart draws.

Crosstab (text table)

A crosstab, text table or pivot table shows numbers in rows and columns. It is the right answer when readers need exact values.

  1. Put Category on Rows and Region on Columns (both dimensions).
  2. Drag SUM(Sales) to Text on the Marks card. The mark type becomes Text.
  3. Add more measures with Measure Names on Rows and Measure Values on Text.

Tips: right-click a header to Format; use Analysis > Table Layout to control empty rows and columns; use Analysis > Show Empty Rows/Columns when a missing combination matters; and Duplicate as Crosstab on any chart tab shows the numbers behind it.

Totals by row and column

Totals live in the Analysis > Totals menu (or in the Analytics pane > Totals).

  • Show Row Grand Totals: adds a column that totals each row.
  • Show Column Grand Totals: adds a row that totals each column.
  • Add All Subtotals: totals the outer dimension when you have nested dimensions.
  • Totals Use (under the same menu) chooses how to aggregate: Automatic, Sum, Average, Min, Max. By default Tableau aggregates the underlying rows the same way as the cells; with a ratio measure like profit margin, the grand total is the margin of the totals (a ratio of sums), not the average of the cell values.
SQL Stand-in: crosstab with row and column grand totals

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

The last row is the column grand total, and row_total is the row grand total. Some SQL engines offer ROLLUP for the same result.

Highlight table

A highlight table is a crosstab with a colored background. Drag the measure to Color as well as Text, and set a color palette. Readers still get the exact numbers, but patterns jump out: dark cells for high sales, a diverging palette to flag losses. It is a cousin of the heat map (Distribution charts).

Dual-axis combination chart

A combination chart (combo chart) draws two measures with different mark types on shared dates, for example sales as bars and profit margin as a line.

  1. Put Order Date (continuous month) on Columns, SUM(Sales) on Rows.
  2. Drag SUM(Profit) to the right side of the view until the dashed drop target appears, or right-click the pill > Dual Axis.
  3. On the Marks card there are now three sections: All, and one per measure. Set SUM(Sales) to Bar and SUM(Profit) to Line.
  4. Right-click the right axis > Synchronize Axis only if both measures have the same unit.
  5. Hide one axis header if the second axis would only confuse.

Use combination charts when the two measures have different units (amounts and a percentage) but share a dimension. Keep the line to a rate or a ratio and bars to a total. When two measures are in the same unit, a plain dual line or stacked panes is clearer.

Lollipop chart

A lollipop chart is a bar chart with a thin stem and a circle at the end, a lighter alternative when many bars would feel heavy.

  1. Build a bar chart: Sub-Category on Rows, SUM(Sales) on Columns, sorted descending.
  2. Drag SUM(Sales) onto the Columns shelf a second time to create two copies, then right-click the second > Dual Axis.
  3. On the Marks card set the first pane to Bar and reduce its Size to a thin line, set the second pane to Circle.
  4. Synchronize Axis and hide the right axis.

The numbers do not change: a lollipop encodes the same data as a bar. Choose it for readability, not for new information.

Bullet graph

A bullet graph compares a value with a target and shows qualitative ranges (poor, fair, good). It packs more information in less space than a gauge.

  1. Put a dimension (Region) on Rows and SUM(Sales) on Columns.
  2. Drag a target measure (Target) onto the view, Show Me > bullet graph: Tableau builds a bar for the value and a reference line for the target.
  3. Right-click the axis > Add Reference Line, choose Distribution and Per Cell, set percentages (such as 60% and 80% of the target) for the shaded bands, and format them.
SQL Stand-in: value against target with bands

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

The band column shows which shaded range the bar would end in.

Gantt chart

A Gantt chart shows durations on a time axis: project tasks, order processing times, campaign windows.

  1. Put a task or order dimension on Rows and a continuous date (Order Date, day level) on Columns.
  2. Change the mark type to Gantt Bar.
  3. Create a calculated field Days to Ship = DATEDIFF('day', [Order Date], [Ship Date]) and drag it to Size. The bar starts at the order date and extends by that many days.
  4. Color by Ship Mode or by a late/on-time flag.
SQL Stand-in: start and duration for each bar

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

gantt_start positions the bar and days_to_ship (the Size field) gives its length. Waterfall charts use the same mark type, as shown in Part-to-whole charts.

Exact numbers

Crosstab Text marks in a grid
Highlight table A crosstab with color

Use them when readers need the values.

1 / 3

Common mistakes

  • Using a crosstab when a chart would show the pattern faster. Add color or switch to a chart.
  • Averaging ratios in totals. Use the total's ratio of sums.
  • Dual axes with no synchronization where the units are the same, so bars and lines mislead.
  • Gantt bars with negative size unless you intended a waterfall.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Where do you add row and column grand totals?

    The Totals menu (also in the Analytics pane) adds grand totals and subtotals.
  2. 2. What defines a Gantt bar?

    Gantt Bar marks start at the axis value and extend by the measure on Size.
  3. 3. Why is a combination chart useful?

    A dual axis lets two measures with different units share a dimension while each keeps its own mark type.
  4. 4. A lollipop chart differs from a bar chart in which way?

    A lollipop is a visual variant of a bar chart; the encoded values are identical.

Summary

  • Crosstabs give exact values; Totals menus add grand totals and subtotals; highlight tables add color.
  • Combination charts and lollipops are dual-axis charts with two mark types.
  • Bullet graphs show a value, a target and bands.
  • Gantt charts need a start (axis) and a duration (Size).

Next: Calculated fields and functions