0
0
Tableaubi_tool~10 mins

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

Choose your learning style9 modes available
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.