0
0
Tableaubi_tool~10 mins

Creating calculated fields in Tableau - Formula Evaluation Walkthrough

Choose your learning style9 modes available
Sample Data

This data shows sales and cost values for three products.

CellValue
A1Sales
A2100
A3200
A4150
B1Cost
B260
B380
B490
Formula Trace
[Sales] - [Cost]
Step 1: [Sales] - [Cost] for row 2: 100 - 60
Step 2: [Sales] - [Cost] for row 3: 200 - 80
Step 3: [Sales] - [Cost] for row 4: 150 - 90
Cell Reference Map
    A       B
1 | Sales | Cost
2 | 100   | 60  
3 | 200   | 80  
4 | 150   | 90  

Arrows: Calculated Field = Sales - Cost uses columns A and B
The calculated field subtracts values in column B (Cost) from column A (Sales) for each row.
Result
    A       B       C
1 | Sales | Cost  | Profit
2 | 100   | 60    | 40
3 | 200   | 80    | 120
4 | 150   | 90    | 60
The new calculated field 'Profit' shows the difference between Sales and Cost for each product.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the calculated field [Sales] - [Cost] represent?
AProfit for each product
BTotal sales
CTotal cost
DSum of sales and cost
Key Result
Calculated fields subtract one measure from another to create a new measure.