12

Chapter 12 · BI tools

Tableau: Visual Analysis and Dashboards

Chapter 11 taught the machinery. Chapter 12 is the workflow: explore the data until you have a finding, build one worksheet per finding, then assemble them into a dashboard that answers a specific person's question.

1The visual analysis cycle

Fig 12.1Six steps, and the loop that matters

Start from the task, not from the data. "Build an executive dashboard" or "show the underlying trends" sets everything downstream. Understand the data structure before choosing a visual, and expect to loop back from insight to mapping repeatedly.

The loop back from insight to visual mapping is the seven stages from Chapter 1, in Tableau's vocabulary. Hover any step for what it means in practice.

Relationships between sheets

Fig 12.2Two tables with nothing in common, connected through a third

Tableau detects common fields and proposes a relationship, which you can edit, and hovering the connector, the "noodle", shows which field links the tables.

People and Returns share no field, but both relate to Orders, so Tableau can bridge them. Best practice is one identifier common to all sheets; failing that, sequential connectors let Tableau treat the set as one dataset. This is why Chapter 5 insisted on data compatibility across visuals, because cross-sheet insight only works when the relationships are clean.

Exploring: the moves that matter

MoveWhat it doesWhy
Drag a dimension to Rows, a measure to ColumnsBuilds the base viewThe core Tableau gesture
Swap rows and columnsOne button flips the orientationFixes truncated labels instantly
SortOrders bars by valueChapter 4: ordering enables assembly and estimation
Move a field to FiltersNarrows to one segmentAnswers "what about just consumers?"
Put Category before SubcategoryAdds the parent levelRestores the hierarchy the reader needs
Drag a field to ColourEncodes a categoryChapter 3's pre-attentive attributes
Show mark labelsPrints values on the marksRemoves the need to read off an axis
Fig 12.3The same view, one move at a time

Sorting is the highest-value move in Tableau. It is one click and it is the difference between a chart that shows data and one that answers a question, which is exactly the represent-to-refine gap from Chapter 1.

Aggregate before you go granular

Fig 12.4Thousands of product names, then three segments

Choose the level of a hierarchy that makes the pattern visible, then drill down. Going straight to the finest level is the commonest way to produce a chart nobody can read from data that had a clear answer in it.

Maps in Tableau

Fig 12.5Filled map against dot map, and a colour-blind safe palette

Tableau recognises a location field automatically and generates latitude and longitude. Choose the map type deliberately, because a filled map and a dot map answer different questions, and Chapter 2's chart-choice rule applies here too. A diverging orange-blue scheme is both readable and colour-blind safe, which is Chapter 3's accessibility rule. Add Region alongside State so the reader can talk about the map in the terms they think in.

Building a dashboard

One sheet is one visualisation. Build each separately, then assemble.

Before you build

Define the audience question

The worked example is an executive managing stores nationally who wants to know where sales come from, what discounts are being given, and whether discount drives sales. Every sheet then exists to answer part of that. This is Chapter 2's context questions applied before any dragging.

While you build

Name your sheets as you go

Rename every sheet descriptively, bold and centred. At assembly time the sheet name becomes the panel title on the dashboard, so naming early saves rework and gives the reader a heading for free.

FormatApplies to
Currency, zero decimalsSales and profit values
Percentage, zero or one decimalDiscount and profit ratios

Set decimals to zero on anything going into a dashboard. Chapter 5 listed excessive precision as one of the thirteen mistakes, and a map squeezed into a panel has no room for it.

Aggregation: the trap worth knowing

Fig 12.6A sum of percentages is meaningless
aggregation

Drop a discount field into a view and Tableau defaults to SUM. This is Chapter 4's measurement scales biting in practice: the tool will happily apply arithmetic the data does not support, and it will not warn you. The question is "what is the average discount", not "what is the total discount".

Calculated fields

Fig 12.7Why COUNTD and not COUNT

COUNTD is a distinct count. Use it for customers, otherwise repeat buyers are counted several times and the per-customer figure is wrong. Tableau autocompletes field names and reports "the calculation is valid" as you type, so syntax errors surface immediately and logic errors like this one do not. Rename every calculated field, because left alone they are called Calculation1, which is unusable later.
MetricFormula
Profit percentageSUM([Profit]) / SUM([Sales])
Sales per customerSUM([Sales]) / COUNTD([Customer ID])
Profit per customerSUM([Profit]) / COUNTD([Customer ID])

Layering dimensions on one chart

Fig 12.8Add one channel at a time, and watch the findings appear

Colour and label carrying different variables is the useful trick. A map coloured by sales with profit percentage printed on each state answers two questions in one graphic, and lets you spot states with high sales but negative profit. Tooltips are where extra detail belongs, because Chapter 5 said a dashboard must not overload the screen, and putting discount into the tooltip keeps it available without spending any space.
The two findings the layering produced
  1. High sales does not mean high profitability. One state can carry large sales at a negative margin while a smaller one is more profitable.
  2. Higher discount does not lead to higher profit. Regions with the largest average discount showed the lowest profit ratios.
  3. Neither finding is visible in the raw table. Both come from putting two measures in one view.

Dashboard layout

Fig 12.9Containers, sizing, and Entire View

Design for the device the audience will use. Chapter 5's first mistake was exceeding the boundaries of a single screen, and picking the size before you place anything is how you avoid it. Set the view to Entire View so a chart fills its panel rather than needing a scrollbar, and if labels truncate, swap rows and columns.
Sizing optionBehaviour
Fixed sizeExact dimensions, customised per device
AutomaticExpands to the largest size available
RangeFlexes between a minimum and maximum

Live linkage: edit a source sheet and the dashboard updates automatically. Add a measure to a worksheet and it appears in the dashboard panel without rebuilding, so refine in the sheet and check the effect in the dashboard.

Key points

  1. The six steps of the visual analysis cycle.
  2. How Tableau relationships work, and how two unrelated tables connect through a third.
  3. Why aggregating to a higher hierarchy level makes patterns visible.
  4. Why sorting is the highest-value single move.
  5. Choosing a filled map against a dot map, and picking a colour-blind safe palette.
  6. That one sheet equals one visualisation, and dashboards assemble sheets.
  7. Why you name and format sheets before assembling.
  8. Why summing a percentage is wrong and averaging is right.
  9. The three calculated fields, and why COUNTD is needed for per-customer metrics.
  10. Which shelves and cards carry which variables, and how one chart holds five.
  11. Why extra detail belongs in a tooltip.
  12. The two findings: high sales is not high profit, and higher discount is not higher profit.
  13. Horizontal and vertical containers, and the three sizing options.
  14. Entire View, and swapping rows and columns to fix truncated labels.