0
0
Tableaubi_tool~10 mins

Forecasting in Tableau - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Monthly sales data for the first six months of the year.

CellValue
A1Month
B1Sales
A2Jan
B2100
A3Feb
B3120
A4Mar
B4130
A5Apr
B5150
A6May
B6170
A7Jun
B7160
Formula Trace
FORECAST(SUM([Sales])) OVER (ORDER BY [Month])
Step 1: SUM([Sales]) for each Month
Step 2: Apply linear trend line to sales data ordered by Month
Step 3: Calculate forecast for next month (Jul, MonthIndex=7)
Cell Reference Map
    A       B
1 | Month | Sales |
2 | Jan   | 100   |
3 | Feb   | 120   |
4 | Mar   | 130   |
5 | Apr   | 150   |
6 | May   | 170   |
7 | Jun   | 160   |

Arrows: Sales values in column B feed into the FORECAST calculation.
The formula uses sales values from B2 to B7 ordered by months in A2 to A7.
Result
    A       B       C
1 | Month | Sales | Forecast |
2 | Jan   | 100   | 100      |
3 | Feb   | 120   | 120      |
4 | Mar   | 130   | 130      |
5 | Apr   | 150   | 150      |
6 | May   | 170   | 170      |
7 | Jun   | 160   | 160      |
8 | Jul   |       | 179      |
The forecast column shows predicted sales for July as 179 based on the trend line from previous months.
Sheet Trace Quiz - 3 Questions
Test your understanding
What is the sum of sales for March?
A120
B150
C130
D160
Key Result
FORECAST applies a trend line on ordered data to predict future values.