Adding reference lines

Among many of Tableau's features, adding reference lines to graphs is one of them. By adding reference lines, we can compare data points with either any constant value or any statistical computation such as average of the measure values.

Getting ready

Let's use the sample file Sample – Coffee Chain (Access). Open a new worksheet and select Sample – Coffee Chain (Access) as the data source.

How to do it...

Once the data is loaded on the worksheet, perform the following steps to add various reference lines:

  1. Drag-and-drop Product Type from Dimensions into the Columns shelf.
  2. Drag-and-drop Profit from Measures into the Columns shelf.
  3. Drag-and-drop Market from Measures into the Rows shelf.
  4. Change the mark type to Shape.
  5. To compare Profit ...

Get Tableau: Creating Interactive Data Visualizations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.