KNOWLEDGE BASE

Creating Custom Reference Lines per Pane


Published: 11 Oct 2018
Last Modified Date: 20 Jul 2023

Question

How to create custom reference lines with a different fixed value for each pane.

Environment

  • Tableau Desktop 

Answer

This example uses Sample - Superstore data. 
  1. Place Category and Region on Columns
  2. Place Profit on Rows.
  3. Select Analysis > Create Calculated Field.
  4. Name the calculated field, for example "Reference Line". Enter a calculation similar to the following, then click OK: 

    CASE Category
    WHEN "Furniture" Then 10000
    WHEN  "Office Supplies" Then 40000
    WHEN "Technology" then 30000
    END

  5. Place Reference Line on Detail.
  6. On the Marks card, Right-click Reference Line and select Measure > Average.
  7. On the Analytics tab, select Average Line and then Pane
  8. Right-click your new reference line and select Edit. Select and enter the following, then click OK:
    • Scope: Per Pane
    • Value: AVG(Reference Line), Average
    • Label: Custom, Goal
Did this article resolve the issue?