0
0
Tableaubi_tool~10 mins

Reference lines in Tableau - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Monthly sales data for 5 months

CellValue
A1Month
B1Sales
A2Jan
B2100
A3Feb
B3150
A4Mar
B4120
A5Apr
B5130
A6May
B6170
Formula Trace
AVG([Sales])
Step 1: SUM([Sales])
Step 2: COUNT([Sales])
Step 3: AVG([Sales]) = SUM([Sales]) / COUNT([Sales])
Cell Reference Map
    A       B
1 Month   Sales
2 Jan     100
3 Feb     150
4 Mar     120
5 Apr     130
6 May     170

[Sales] values are from B2 to B6
Reference line uses the Sales column values from cells B2 to B6
Result
    A       B       C
1 Month   Sales   Reference Line
2 Jan     100     ----------------
3 Feb     150     |              
4 Mar     120     |  Average = 134
5 Apr     130     |              
6 May     170     ----------------
The reference line is drawn at the average sales value 134 across the months
Sheet Trace Quiz - 3 Questions
Test your understanding
What is the sum of sales used to calculate the reference line?
A670
B134
C5
D150
Key Result
Reference line in Tableau uses aggregation functions like AVG() to calculate a constant value across the axis