Bird
Raised Fist0
Tableaubi_tool~10 mins

Trend analysis in Tableau - Cell-by-Cell Formula Trace

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
Sample Data

Monthly sales data for five months

CellValue
A1Month
B1Sales
A2Jan
B2100
A3Feb
B3120
A4Mar
B4130
A5Apr
B5150
A6May
B6170
Formula Trace
TREND(Sales)
Step 1: Identify sales values: [100, 120, 130, 150, 170]
Step 2: Assign time index to months: [1, 2, 3, 4, 5]
Step 3: Calculate slope (m) of trend line using formula: m = (N*Σxy - Σx*Σy) / (N*Σx² - (Σx)²)
Step 4: Calculate intercept (b) using formula: b = (Σy - m*Σx) / N
Step 5: Calculate trend values for each month: y = m*x + b
Cell Reference Map
    A      B
1 Month  Sales
2 Jan    100
3 Feb    120
4 Mar    130
5 Apr    150
6 May    170

Arrows: Sales values from B2:B6 feed into TREND calculation
Sales values from cells B2 to B6 are used to calculate the trend line.
Result
    A      B       C
1 Month  Sales   Trend
2 Jan    100     41
3 Feb    120     58
4 Mar    130     75
5 Apr    150     92
6 May    170     109
Column C shows the trend line values calculated for each month, indicating the sales trend.
Sheet Trace Quiz - 3 Questions
Test your understanding
What is the slope of the trend line calculated from the sales data?
A92.5
B17
C150
D670
Key Result
TREND fits a straight line to data points by calculating slope and intercept to predict values over time.

Practice

(1/5)
1. What is the main purpose of trend analysis in Tableau?
easy
A. To create pie charts for categories
B. To show how data changes over time
C. To filter data by region
D. To sort data alphabetically

Solution

  1. Step 1: Understand trend analysis concept

    Trend analysis focuses on observing data changes over a period of time.
  2. Step 2: Identify the correct purpose

    Among the options, only showing data changes over time matches trend analysis.
  3. Final Answer:

    To show how data changes over time -> Option B
  4. Quick Check:

    Trend analysis = show data changes over time [OK]
Hint: Trend analysis = data changes over time [OK]
Common Mistakes:
  • Confusing trend analysis with filtering or sorting
  • Thinking trend analysis creates pie charts
  • Assuming trend analysis is about categories only
2. Which of the following is the correct way to add a trend line in Tableau?
easy
A. Drag a date field to Columns, measure to Rows, then add trend line from Analytics pane
B. Drag a measure to Filters, then add trend line from Data pane
C. Drag a dimension to Rows, then add trend line from Marks card
D. Drag a date field to Filters, then add trend line from Format pane

Solution

  1. Step 1: Understand how to create trend charts

    Trend charts require date on Columns and measure on Rows to show data over time.
  2. Step 2: Identify how to add trend lines

    Trend lines are added from the Analytics pane, not Data, Marks, or Format panes.
  3. Final Answer:

    Drag a date field to Columns, measure to Rows, then add trend line from Analytics pane -> Option A
  4. Quick Check:

    Date on Columns + measure on Rows + Analytics pane = trend line [OK]
Hint: Date on Columns + measure on Rows + Analytics pane [OK]
Common Mistakes:
  • Trying to add trend line from wrong pane
  • Placing date field in Filters instead of Columns
  • Adding trend line without proper chart setup
3. Given a line chart with Sales on Rows and Order Date (year) on Columns, what does adding a linear trend line show?
medium
A. The average sales value across all years
B. The sales distribution by product category
C. The total sales for each year
D. The direction and strength of sales change over years

Solution

  1. Step 1: Understand what a linear trend line represents

    A linear trend line shows the overall direction (up/down) and strength of change in data over time.
  2. Step 2: Apply this to sales over years

    It does not show averages or totals directly, but the pattern of sales increase or decrease over years.
  3. Final Answer:

    The direction and strength of sales change over years -> Option D
  4. Quick Check:

    Linear trend line = direction and strength of change [OK]
Hint: Trend line shows direction and strength of change [OK]
Common Mistakes:
  • Confusing trend line with average or total values
  • Thinking trend line shows category distribution
  • Ignoring that trend line summarizes pattern over time
4. You created a trend chart but the trend line does not appear. What is the most likely reason?
medium
A. The trend line option is disabled in Tableau settings
B. The measure is placed on Filters instead of Rows
C. The date field is not continuous (green) on Columns
D. The data source has no date field

Solution

  1. Step 1: Check date field type on Columns

    Trend lines require a continuous date field (green pill) on Columns to show smooth trends.
  2. Step 2: Understand why trend line might not appear

    If the date is discrete (blue pill), Tableau treats it as categories, so trend line cannot be drawn.
  3. Final Answer:

    The date field is not continuous (green) on Columns -> Option C
  4. Quick Check:

    Continuous date needed for trend line [OK]
Hint: Use continuous (green) date on Columns for trend lines [OK]
Common Mistakes:
  • Placing measure on Filters instead of Rows
  • Assuming trend line option is disabled by default
  • Ignoring the date field type requirement
5. You want to analyze monthly sales trends for two product categories side by side. Which setup in Tableau best achieves this?
hard
A. Place Order Date (month) on Columns, Sales on Rows, and Category on Color; add trend lines
B. Place Category on Columns, Sales on Rows, and Order Date (month) on Filters; add trend lines
C. Place Sales on Columns, Order Date (month) on Rows, and Category on Filters; add trend lines
D. Place Order Date (month) on Rows, Category on Rows, and Sales on Filters; add trend lines

Solution

  1. Step 1: Arrange date and measure for trend analysis

    Order Date (month) should be on Columns (continuous) and Sales on Rows to show trends over time.
  2. Step 2: Use Category on Color to compare categories side by side

    Placing Category on Color differentiates lines for each category in the same chart.
  3. Step 3: Add trend lines from Analytics pane

    This setup allows clear monthly trends for each category with trend lines visible.
  4. Final Answer:

    Place Order Date (month) on Columns, Sales on Rows, and Category on Color; add trend lines -> Option A
  5. Quick Check:

    Date on Columns + Sales on Rows + Category on Color = side-by-side trends [OK]
Hint: Date on Columns, Sales on Rows, Category on Color for side-by-side trends [OK]
Common Mistakes:
  • Putting Category on Filters hides categories from view
  • Placing Sales on Columns breaks trend line logic
  • Using Filters for date removes timeline context