KNOWLEDGE BASE

How to Create Color Legend for Reference Line


Published: 25 Jul 2019
Last Modified Date: 24 Aug 2022

Question

How to create color legend for reference line

Environment

Tableau Desktop

Answer

Follow these steps:
  1. Create calculated fields with name matching reference lines and content.
    • Average
    • Maximum
    • Minimum
  2. Create a new sheet, change Marks type to Square, drag Measure Names to Columns, Label, Color, Measure Values to Details.
  3. Right click on Measure Names and un-check Show Header.
  4. Format -> Borders, set Row Divider to None.
  5. Arrange graph and legend together in the Dashboard.
Did this article resolve the issue?