All IT Courses 50% Off
Tableau Tutorials

Reference Lines, Bands, Boxes, and Distributions in Tableau

Tableau lets you add a reference line, distribution, band, or box plot to identify a specific region, value, or range on a continuous axis in Tableau. For instance, if you are analyzing the monthly sales of several products, you can include a reference line at the average sales mark to see how each product performed against the Average.

Reference Lines

You can easily add a reference line at a constant or computed value (based on a specified field) on the axis. You can also include confidence intervals with the reference line.

https://help.tableau.com/current/pro/desktop/en-us/Img/reflines1.png

Reference Bands

Reference bands shade an area behind the marks in the view between two constant or computed values on the axis.

https://help.tableau.com/current/pro/desktop/en-us/Img/reflines2.png

Reference Distributions

Reference distributions add a gradient of shading to indicate the values’ distribution along the axis. Distribution can be defined by percentiles, percentages, quantiles (as in the below image), or standard deviation.

https://help.tableau.com/current/pro/desktop/en-us/Img/reflines3.png

Box Plots: Box plots (also known as box and whisker charts) are a standardized graphic for describing values along an axis. Box plots show quartiles (hinges) and whiskers. Tableau provides different styles of a box plot and allows you to configure the whiskers’ location and other details.

All IT Courses 50% Off
https://help.tableau.com/current/pro/desktop/en-us/Img/refline_boxplot_modern.png

How to add a Reference Line?

  1. Drag the Reference Line from the Analytics pane into the view. The range of choices available depends on the type of item and the current view.

The drop target area comprises of three options:

https://help.tableau.com/current/pro/desktop/en-us/Img/reference_bands_simple_drop_web.png

The above view is from a web editing session. In Tableau Desktop, the process is the same, but the user interface looks different. The terms Table, Cell, and Pane define the scope for the item:

https://help.tableau.com/current/pro/desktop/en-us/Img/reflines_scope1.png

For a more complicated view, for example, if the view contains a line chart with multiple or dual axes, Tableau shows you an expanded drop target area:

https://help.tableau.com/current/pro/desktop/en-us/Img/reference_lines_notsimple_drop_web.png

If you drop the item in any one of the three larger boxes in the header (for instance, the Table box), a separate reference line will add for each of the continuous fields in the view:

https://help.tableau.com/current/pro/desktop/en-us/Img/reference_lines_we2.png

If you drop the item in any one of the lower boxes aligned with a specific continuous field, the line will be added on the corresponding axis, with the specified scope.

When you drop the line in the drop target area, Tableau displays a dialog box:

Reference Lines, Bands, Boxes, and Distributions in Tableau
  1. The Line option is selected at the top of the dialog box.
  2. Select a continuous field from the field Value to use as the basis for your reference line. You can select a parameter also. You cannot select a continuous field that is not available currently in the view as the basis for your reference line. If you want to use that continuous field, do the following:
  • Drag a continuous field (from the Data pane) to the Details target on the Marks card.
  • Change the continuous field’s aggregation if required. This will not change the view, but allow you to use that continuous field as the basis for your reference band.
  • Click on the reference line and choose option Edit to reopen the Edit Line dialog box.
  1. Select an aggregation that is displayed depending on the continuous field you select:
  • Total: places a line at the aggregate of all the values in either the cell, pane, or the complete view. This option is useful while computing a weighted average rather than an average of averages. It is also useful while working with a calculation with a custom aggregation. The total is calculated using the underlying data and it behaves the same as selecting one of the totals option the Analysis menu.
  • Sum: This places a line at the SUM of all the values in either the cell, pane, or entire view.
  • Constant: This places a line at the specified value on the axis.
  • Minimum: This places a line at the minimum value.
  • Maximum: This places a line at the maximum value.
  • Average: This places a line at the average value along the axis.
  • Median: This places a line at the median value.
  1. Select the option to label the line:
  • None: Select this option to not show a label for the reference line.
  • Value: select this option to show a label corresponding to the line’s value on the axis.
  • Computation: select this option for displaying the name of the continuous field as the basis for your reference line and any calculation that is performed.
  • Custom: select this option for building a custom label in the text box. You can also use the menu to the right of the text box to insert values like the computation or the value. You can also directly type text into the box so that you could create value such as <Field Name> = <Value>.
  1. Select the option on how you want the tooltip to appear.
  • None: select this option to not show a tooltip for the reference line.
  • Automatic: select this option to show the default tooltip for the reference line.
  • Custom: select this option for building a custom label in the tooltip. You can also use the menu to the right of the text box to insert values like the computation or the value. You can also directly type text into the box so that you could create value such as <Field Name> = <Value>.
  1. Specify the option on whether to display the line with a confidence interval, just the line, or confidence interval.

Confidence interval distribution bands shade the region where the population average will fall n of the time, where n is the value you will select in the drop-down on the right. You can also choose one of the listed numeric values or select a parameter:

https://help.tableau.com/current/pro/desktop/en-us/Img/reference_lines_web4.png

The higher you select the value, the wider the bands will be.

  1. You can specify formatting options for the line.
https://help.tableau.com/current/pro/desktop/en-us/Img/addline5.png
  1. Optionally, you can also add a fill color above and below the line.
https://help.tableau.com/current/pro/desktop/en-us/Img/addline6.png

When you display a line and a confidence interval, the shading will be darker within the confidence interval, and lighter beyond it:

https://help.tableau.com/current/pro/desktop/en-us/Img/addline8.png

When you display a confidence interval without a line, the ‘fill’ colors are disregarded, although your settings are retained and applied if you decide later to show a line.

  1. Specify whether you want to ‘Show’ recalculated line for highlighted or selected data points. 

How to add Reference Bands?

Reference Bands are the shaded areas behind the marks in the view between two constant or computed values on the axis. You can also add reference bands to any continuous axis in the view.

  1. Drag the Reference Band from the Analytics pane into the view. The range of choices depend on the type of item and the current view.

The drop target area comprises of just three options:

https://help.tableau.com/current/pro/desktop/en-us/Img/reference_bands_simple_drop_web.png

The terms Table, Cell, and Pane define the scope for the item:

https://help.tableau.com/current/pro/desktop/en-us/Img/reflines_scope1.png

For a more complicated view, for example, if the view contains multiple or dual axes, Tableau shows you an expanded drop target area:

https://help.tableau.com/current/pro/desktop/en-us/Img/reference_bands_notsimple_drop_web.png

If you drop the item in any one of the three larger boxes in the header (for instance, the Table box), a separate set of bands will add for each continuous field in the view:

https://help.tableau.com/current/pro/desktop/en-us/Img/reference_bands_web2.png

If you drop the item in any one of the lower boxes aligned with a specific continuous field, the band will be added on the corresponding axis, with the specified scope.

When you drop the band in the drop target area, Tableau displays a dialog box:

Reference Lines, Bands, Boxes, and Distributions in Tableau
  1. The Band area is selected at the top of the dialog box.
  2. Select the two continuous fields to use as the basis for your reference band in each Value field. You can select a parameter from the drop-down lists. You can not select the same continuous field and aggregation in both areas. You cannot select a continuous field that is not available currently in the view as the basis for your reference band. If you want to use that continuous field, do the following:
  • Drag the continuous field (from the Data pane) to Details target on the Marks card.
  • Change the continuous field’s aggregation if required. This will not change the view, but allow you to use that continuous field as the basis for your reference band.
  • Click on the reference band in the view and choose the option Edit to reopen the Edit Band dialog box and select continuous field in the Value (From) area and in the Value (To) area.
  1. Select a computation for each value. The options displayed depend on the continuous field you select:
  • Total: extends the band to a value that is at the aggregate of all the values in either the cell, pane, or the complete view. This option is useful while computing a weighted average rather than an average of averages. It is also useful while working with a calculation with a custom aggregation. The total is calculated using the underlying data and it behaves the same as selecting one of the totals option the Analysis menu.
  • Sum: extends the band to a value at the SUM of all the values in either the cell, pane, or entire view.
  • Constant: extends the band to a value that is at the specified value on the axis.
  • Minimum: extends the band to a value that is at the minimum value.
  • Maximum: extends the band to a value that is at the maximum value.
  • Average: extends the band to a value that is at the average value along the axis.
  • Median: extends the band to a value that is at the median value.
  1. Select the option on how you want to label the bands:
  • None: select this option to not show a label for the reference band.
  • Value: select this option to show a label corresponding to the band’s value on the axis.
  • Computation: select this option to display the name of the continuous field as the basis for your reference band and any calculation that is performed.
  • Custom: select this option for building a custom label in the text box. You can also use the menu to the right of the text box to insert values like the computation or the value. You can also directly type text into the box so that you could create value such as <Field Name> = <Value>.
  1. Select the option on how you want the tooltip to appear.
  • None: select this option to not show a tooltip for the reference band.
  • Automatic: select this option to show the default tooltip for the reference band.
  • Custom: select this option for building a custom label in the tooltip. You can also use the menu to the right of the text box to insert values like the computation or the value. You can also directly type text into the box so that you could create value such as <Field Name> = <Value>.
  1. You can also specify the formatting options for the bands and mark the two values within a line or can select a shading color for the band.
https://help.tableau.com/current/pro/desktop/en-us/Img/addband8.png

How to add Reference Distributions?

While adding a reference distribution, you can specify one, two, or more values. One value results in a line; with two or more values, the result is a set of one, two, or more bands.

  1. Drag the Distribution Band from the Analytics pane into the view. The range of choices,  depend on the type of item and the current view.
  2. Select a scope for the distribution. The terms Table, Cell, and Pane define the scope for the item:
https://help.tableau.com/current/pro/desktop/en-us/Img/reflines_scope1.png
  1. Select the computation option that will be used to create the distribution:
  • Percentages: shades the interval between the specified percentage values. Use a comma for separating two or more percentage values (for instance, 60, 80), and specify which measure and aggregation to use.
https://help.tableau.com/current/pro/desktop/en-us/Img/distribution6.png
  • Percentiles: shades intervals at the specified percentiles. Enter a value from the drop-down list Value, and enter two or more numerical values, delimited by commas (for instance, 60, 80 or 25, 50, 75).
  • Quantiles: breaks the view into the specified number of tiles using shading and lines. While you select this computation, you must also specify the number of tiles (from 3 to 10, inclusive). For instance, if you select 3, Tableau calculates the boundaries between the first, second, and the third terciles by calling a general quantile function and ask for the 33.33 and the 66.66 quantiles. It will then shades the three terciles differently. Tableau uses the estimation type 7 in the R standard to compute quantiles and percentiles.
  • Standard Deviation: places lines and shading to indicate the specified number of standard deviations above the mean and below the mean. While you select this option, you must specify the factor: the number of standard deviations and whether the computation is on a population sample.
  1. Specify the option on how you want to label the distribution bands:
  • None: select this option to not show a label for the distribution bands.
  • Value: select this option to show a label corresponding to each distribution band’s value on the axis.
  • Computation: select this option to display the name of the continuous field as the basis for your distribution bands and any calculation that is performed.
  • Custom: select this option for building a custom label in the text box. You can also use the menu to the right of the text box to insert values like the computation or the value. You can also directly type text into the box so that you could create value such as <Field Name> = <Value>.
  1. Specify whether you want to Show recalculated band for highlighted or selected data points.

How to add a Bullet Graph?

Reference distributions can also be used for creating bullet graphs. A bullet graph is the variation of a bar graph that is developed to replace dashboard gauges and meters. The bullet graph is usually used to compare a primary measure to one or more other measures in qualitative ranges of performance, like poor, satisfactory, and good. You can also create a bullet graph by adding distribution to indicate the qualitative ranges of performance, and the line to indicate the target. The below procedure uses Show Me to make this process easier.

  1. Select one or more dimensions and two measures in the Data pane. The bullet graph will compare the measure values. For instance, budget vs. actual, actual vs. target, etc. You can also select multiple fields in the Data pane by holding down the Ctrl key while you click fields. If you use the Superstore sample workbook, you can select the fields to show below:
https://help.tableau.com/current/pro/desktop/en-us/Img/bulletgraph1web.png
  1. Click the Show Me button available in the toolbar.
https://help.tableau.com/current/pro/desktop/en-us/Img/example6b_10.0.png
  1. Select Bullet Graph available in the Show Me pane.
https://help.tableau.com/current/pro/desktop/en-us/Img/bulletgraph3_10.0.png

Tableau adds a reference distribution defined at 60% and 80% of the Average of the measure on Detail. It adds a reference line that marks the Average of the same measure. The other measure is also placed on the Rows shelf.

https://help.tableau.com/current/pro/desktop/en-us/Img/bulletgraph4.png

You can also edit either of these to change its definition. For instance, you may want to add 100% to the set of distribution band values or always draw it. Click on the outer edge or a distribution band, or the line, and choose Edit.

How to add a Box Plot?

You can also add box plots to a continuous axis. Using box plots, also known as box-and-whisker plots, shows the distribution of values along an axis. Boxes indicate the middle 50 percent of the data (i.e., the middle two quartiles of the data’s distribution). You can also configure lines, called whiskers, to display all points within 1.5 times the interquartile range, or all points at the maximum extent of the data, as shown in the below image:

https://help.tableau.com/current/pro/desktop/en-us/Img/boxplot1_149x388.png

Boxplots are available from the Show Me pane also when you have at least one measure in the view:

https://help.tableau.com/current/pro/desktop/en-us/Img/boxplot2.png

To add a box plot:

  1. Right-click on a quantitative axis and select the Add Reference Line.
https://help.tableau.com/current/pro/desktop/en-us/Img/addline1.png
  1. In the window Add Reference Line, Band, or Box dialog box, select the Box Plot.
https://help.tableau.com/current/pro/desktop/en-us/Img/boxplot3.png
  1. Under Plot Options, specify the placement for the whiskers:
  • Data within 1.5 times the IQR: it places whiskers at the location that is 1.5 times the interquartile range, means, 1.5 times further out than the width of the adjoining box. It is also known as a schematic box plot.
  • Maximum extent of the data: it places whiskers at the farthest data point (mark) in the distribution. It is also known as a skeletal box plot.
  1. Specify whether you want to Hide underlying marks (except outliers), whether to hide all marks except those that are beyond the whiskers.
  2. Configure the appearance of the plot by selecting a Style, Border, Fill, and Whiskers.

How to edit Existing Reference Lines, Bands, and Distributions?

You can also edit existing lines, bands, or distributions. For this, click on a line or the outer edge of a band and choose the option Edit to reopen the edit dialog box for that object.

https://help.tableau.com/current/pro/desktop/en-us/Img/reference_lines_web5.png

How to remove Reference Lines, Bands, or Distributions?

For removing a reference line, band, or distribution, click on a line or the band’s outer edge and choose the option Remove. You can drag a line or band of the view.

Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Articles

Back to top button