Bird
Raised Fist0
Tableaubi_tool~8 mins

Trend lines in Tableau - Dashboard 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
Dashboard Mode - Trend lines
Dashboard Goal

Understand sales trends over months and see how sales are increasing or decreasing over time using trend lines.

Sample Data
MonthSales
January100
February120
March130
April150
May170
June160
July180
August200
Dashboard Components
  • KPI Card: Total Sales
    Formula: SUM([Sales])
    Result: 1210
  • Line Chart: Monthly Sales Trend
    Shows sales by month as points connected by lines.
    Trend Line: Added linear trend line to show overall sales direction over months.
Dashboard Layout
+----------------------+--------------------+
|      Total Sales      |  Monthly Sales     |
|       (KPI Card)      |    Trend Line      |
|                      |   (Line Chart)     |
+----------------------+--------------------+
Interactivity

A filter for selecting months allows users to focus on specific periods. When months are filtered, both the Total Sales KPI and the Monthly Sales Trend chart update to reflect only the selected months.

Self Check

If you add a filter to show only months from April to August, which components update and what changes do you see?

  • Both the Total Sales KPI and the Monthly Sales Trend chart update.
  • Total Sales will sum sales from April to August (150 + 170 + 160 + 180 + 200 = 860).
  • The trend line will adjust to show the sales trend only for these months.
Key Result
Dashboard shows total sales and monthly sales trend with a linear trend line to understand sales direction over time.

Practice

(1/5)
1. What is the main purpose of adding trend lines in a Tableau visualization?
easy
A. To change the color scheme of the chart
B. To show the general direction or pattern in the data over time or categories
C. To create a detailed table of raw data
D. To filter data based on specific conditions

Solution

  1. Step 1: Understand the role of trend lines

    Trend lines help visualize the overall direction or pattern in data, such as increasing or decreasing trends.
  2. Step 2: Compare with other options

    Filtering data, creating tables, or changing colors are different Tableau features unrelated to trend lines.
  3. Final Answer:

    To show the general direction or pattern in the data over time or categories -> Option B
  4. Quick Check:

    Trend lines = show data direction [OK]
Hint: Trend lines reveal data direction, not filtering or colors [OK]
Common Mistakes:
  • Confusing trend lines with filters
  • Thinking trend lines change colors
  • Assuming trend lines show raw data tables
2. Which of the following is the correct way to add a trend line in Tableau?
easy
A. Use the Color shelf to add a trend line
B. Right-click the axis and select 'Add Filter'
C. Drag the Trend Line option from the Analytics pane onto the visualization
D. Create a calculated field named 'Trend Line'

Solution

  1. Step 1: Recall how to add trend lines in Tableau

    Trend lines are added by dragging the Trend Line option from the Analytics pane onto the chart.
  2. Step 2: Eliminate incorrect methods

    Adding filters, using color shelves, or creating calculated fields do not add trend lines directly.
  3. Final Answer:

    Drag the Trend Line option from the Analytics pane onto the visualization -> Option C
  4. Quick Check:

    Analytics pane drag = add trend line [OK]
Hint: Use Analytics pane drag to add trend lines quickly [OK]
Common Mistakes:
  • Trying to add trend lines via filters
  • Using color shelf instead of Analytics pane
  • Creating calculated fields unnecessarily
3. Given a sales over time line chart in Tableau with a linear trend line added, what does the slope of the trend line indicate?
medium
A. The maximum sales value in the data
B. The average sales per month
C. The total sales amount
D. The rate of increase or decrease in sales over time

Solution

  1. Step 1: Understand what slope represents in trend lines

    The slope of a linear trend line shows how quickly the values change over time, indicating increase or decrease rate.
  2. Step 2: Differentiate slope from totals or averages

    Total sales or averages are summary statistics, not the slope. Maximum value is a single point, not a trend.
  3. Final Answer:

    The rate of increase or decrease in sales over time -> Option D
  4. Quick Check:

    Slope = rate of change [OK]
Hint: Slope shows speed of change, not totals or averages [OK]
Common Mistakes:
  • Confusing slope with total or average values
  • Thinking slope shows maximum data point
  • Ignoring that slope measures rate of change
4. You added a trend line in Tableau but it does not appear on your scatter plot. What is the most likely reason?
medium
A. The data has too few points or no variation to calculate a trend line
B. You forgot to refresh the data source
C. Trend lines only work on bar charts, not scatter plots
D. You need to add a filter before adding a trend line

Solution

  1. Step 1: Check data suitability for trend lines

    Trend lines require enough data points and variation to calculate a meaningful line.
  2. Step 2: Evaluate other options

    Refreshing data or adding filters does not affect trend line visibility directly. Trend lines work on scatter plots too.
  3. Final Answer:

    The data has too few points or no variation to calculate a trend line -> Option A
  4. Quick Check:

    Insufficient data = no trend line [OK]
Hint: Trend lines need enough varied data points [OK]
Common Mistakes:
  • Assuming trend lines only work on bar charts
  • Forgetting data must have variation
  • Thinking filters or refresh affect trend line display
5. You want to compare sales trends between two product categories over time in Tableau. Which approach best uses trend lines to achieve this?
hard
A. Create a line chart with sales over time, add product category to the color shelf, then add trend lines for each category
B. Create separate bar charts for each category and add a single trend line to each
C. Use a scatter plot with sales and time, then add one trend line for all data combined
D. Add product category as a filter and add a trend line to the filtered data only

Solution

  1. Step 1: Visualize sales over time by category

    Using a line chart with product category on color shelf separates lines by category, showing trends distinctly.
  2. Step 2: Add trend lines per category

    Adding trend lines in this setup creates one trend line per category, allowing direct comparison.
  3. Step 3: Evaluate other options

    Separate bar charts or single combined trend lines do not compare trends well. Filtering limits comparison.
  4. Final Answer:

    Create a line chart with sales over time, add product category to the color shelf, then add trend lines for each category -> Option A
  5. Quick Check:

    Trend lines per category = best comparison [OK]
Hint: Use color shelf to split lines, then add trend lines per group [OK]
Common Mistakes:
  • Adding one trend line for all categories combined
  • Using bar charts which don't show trends well
  • Filtering instead of comparing categories side-by-side