Bird
Raised Fist0
Tableaubi_tool~5 mins

Reference lines in Tableau - Step-by-Step Guide

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Introduction
Reference lines help you add a line on your chart to show important values like averages or targets. They make it easier to compare your data against a fixed point or summary measure.
When you want to show the average sales on a sales chart to see which months are above or below average.
When you need to highlight a sales target line on a bar chart to compare actual sales against the goal.
When you want to mark a specific date on a timeline to show an event or deadline.
When you want to add a constant value line to a scatter plot to separate data into groups.
When you want to show minimum or maximum values as a guide on your chart.
Steps
Step 1: Open
- Tableau worksheet with your chart
Your chart is visible and ready for editing
Step 2: Right-click
- the axis where you want to add the reference line
A context menu appears
Step 3: Select
- "Add Reference Line" from the context menu
The Add Reference Line dialog box opens
Step 4: Choose
- "Reference Line" tab in the dialog box
Options to set the reference line appear
Step 5: Set
- "Value" dropdown to select a measure or constant
The reference line will be based on the selected value
Step 6: Customize
- Label, Line, and Tooltip sections in the dialog
You see the preview of the reference line on the chart
Step 7: Click
- "OK" button
The reference line appears on the chart at the chosen value
Before vs After
Before
Chart shows monthly sales bars with no lines to indicate average or targets
After
Chart shows monthly sales bars with a solid reference line at the average sales value labeled 'Average'
Settings Reference
Value
📍 Add Reference Line dialog box, Value dropdown
Defines the value or calculation where the reference line will be placed
Default: Constant
Label
📍 Add Reference Line dialog box, Label section
Controls the text shown on or near the reference line
Default: Value
Line Style
📍 Add Reference Line dialog box, Line section
Changes the appearance of the reference line
Default: Solid
Tooltip
📍 Add Reference Line dialog box, Tooltip section
Controls whether a tooltip appears when hovering over the reference line
Default: Show
Common Mistakes
Adding a reference line on the wrong axis
The line will not align with the data you want to highlight and can confuse viewers
Always right-click the axis that corresponds to the measure or dimension you want to reference
Choosing 'Constant' but not entering a value
The reference line will not appear because Tableau does not know where to place it
Enter a specific number when using 'Constant' as the value
Not customizing the label, leaving it blank
Viewers may not understand what the reference line represents
Add a clear label like 'Target' or 'Average' to explain the line
Summary
Reference lines add clear markers on charts to highlight important values or targets.
You add them by right-clicking the axis and selecting 'Add Reference Line'.
Make sure to choose the correct axis and value to avoid confusion.

Practice

(1/5)
1. What is the main purpose of adding a Reference Line in a Tableau chart?
easy
A. To highlight a specific value like an average or target on the chart
B. To change the color of the chart background
C. To filter out unwanted data points from the view
D. To add a new data source to the workbook

Solution

  1. Step 1: Understand the role of reference lines

    Reference lines are used to mark important values such as averages, targets, or constants on a chart to help viewers compare data easily.
  2. Step 2: Identify the correct purpose

    Among the options, only highlighting a specific value like an average or target matches the purpose of reference lines.
  3. Final Answer:

    To highlight a specific value like an average or target on the chart -> Option A
  4. Quick Check:

    Reference lines = highlight key values [OK]
Hint: Reference lines mark important values on charts [OK]
Common Mistakes:
  • Confusing reference lines with filters
  • Thinking reference lines change chart colors
  • Assuming reference lines add data sources
2. Which of the following is the correct way to add a reference line in Tableau?
easy
A. Drag a measure to the Filters shelf
B. Right-click on the axis and select 'Add Reference Line...'
C. Double-click on the data source name
D. Click 'New Worksheet' and type the reference value

Solution

  1. Step 1: Recall how to add reference lines

    In Tableau, reference lines are added by right-clicking on an axis and choosing the 'Add Reference Line...' option.
  2. Step 2: Eliminate incorrect options

    Dragging a measure to Filters filters data, double-clicking data source name does nothing related, and creating a new worksheet doesn't add reference lines.
  3. Final Answer:

    Right-click on the axis and select 'Add Reference Line...' -> Option B
  4. Quick Check:

    Add reference line = right-click axis [OK]
Hint: Right-click axis to add reference line quickly [OK]
Common Mistakes:
  • Trying to add reference lines via Filters shelf
  • Looking for reference line option in data source menu
  • Confusing worksheet creation with adding lines
3. Given a sales bar chart, you add a reference line set to the average sales. What will the reference line show?
medium
A. A line at the average sales value across all data points
B. A line at the maximum sales value
C. A line at the total sum of all sales
D. A line at zero sales

Solution

  1. Step 1: Understand the average reference line

    When you add a reference line set to average, Tableau calculates the mean value of the sales data and draws a line at that value.
  2. Step 2: Match the correct description

    The average is not the total sum, maximum, or zero, so the line will be at the average sales value.
  3. Final Answer:

    A line at the average sales value across all data points -> Option A
  4. Quick Check:

    Average reference line = average value [OK]
Hint: Average reference line marks mean value [OK]
Common Mistakes:
  • Confusing average with total sum
  • Thinking average line shows max value
  • Assuming reference line defaults to zero
4. You added a reference line at a constant value of 100, but it does not appear on your chart. What is the most likely reason?
medium
A. Reference lines only work on pie charts
B. Reference lines cannot be constants in Tableau
C. You forgot to refresh the data source
D. The constant value is outside the axis range displayed

Solution

  1. Step 1: Check axis range relevance

    If the constant reference line value is outside the visible axis range, Tableau will not display it on the chart.
  2. Step 2: Verify other options

    Reference lines can be constants, refreshing data is unrelated, and reference lines work on many chart types, not just pie charts.
  3. Final Answer:

    The constant value is outside the axis range displayed -> Option D
  4. Quick Check:

    Reference line visibility depends on axis range [OK]
Hint: Check axis range if reference line is missing [OK]
Common Mistakes:
  • Believing constants can't be reference lines
  • Assuming data refresh fixes reference line display
  • Thinking reference lines only apply to pie charts
5. You want to add a reference line that shows the median sales per region on a sales by region bar chart. Which steps should you follow?
hard
A. Drag the sales measure to Filters and select median aggregation
B. Create a calculated field for median sales and add it as a color mark
C. Right-click the sales axis, choose 'Add Reference Line', set scope to 'Per Pane', and aggregation to 'Median'
D. Add a reference line with aggregation set to 'Sum' and scope 'Entire Table'

Solution

  1. Step 1: Add reference line on sales axis

    Right-click the sales axis to access the reference line options.
  2. Step 2: Configure reference line for median per region

    Set the scope to 'Per Pane' (which corresponds to per region in this chart) and aggregation to 'Median' to show median sales per region.
  3. Final Answer:

    Right-click the sales axis, choose 'Add Reference Line', set scope to 'Per Pane', and aggregation to 'Median' -> Option C
  4. Quick Check:

    Median per region = reference line with 'Per Pane' and 'Median' [OK]
Hint: Use 'Per Pane' scope and 'Median' aggregation for per-region median [OK]
Common Mistakes:
  • Using Filters instead of reference lines for median
  • Confusing sum aggregation with median
  • Setting scope to entire table instead of per pane