KNOWLEDGE BASE

Creating a Reference Line that Does Not Change When Filtered


Published: 19 May 2014
Last Modified Date: 21 Oct 2015

Question

How to create a dynamic reference line that does not change when filtered.

Environment

Tableau Desktop

Answer

Tableau Desktop 9 and later versions

Create a new calculated field with an LOD expression to get the desired value. For example, to show a reference line that displays the constant average sales, despite the view being filtered:
  1. Create a calculated field with the following formula: {AVG([Sales])}.
  2. Use this field as the reference line field.

Tableau Desktop 8 and earlier versions

  1. Duplicate the data source.
  2. Create a calculated field using one of the window table calculations.
  3. Place the calculated field onto the Detail shelf.
  4. Right-click the axis and select Add reference line, band or box.
Did this article resolve the issue?