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 values for each Product Type and Market value with the average Profit value for all markets and product types, right-click on the Profit axis, select Add Reference Line, keep the Scope option value to Per Pane, accept all the default values, and hit OK. The graph should look like the one in the following screenshot:
    How to do it...
  6. To compare the Profit values to a fixed value, right-click on the Profit axis, select Edit Reference Line, keep the Scope value at Per Pane, under the Line selections, change the drop-down value to Constant from Average (as shown in the following screenshot), in the Value box enter 25,000, and hit OK:
    How to do it...
  7. The chart with a constant reference line should look similar to the one shown in the following screenshot:
    How to do it...
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset