0
0
Tableaubi_tool~5 mins

Arithmetic calculations in Tableau - Step-by-Step Guide

Choose your learning style9 modes available
Introduction
Arithmetic calculations in Tableau let you create new numbers by adding, subtracting, multiplying, or dividing existing data. This helps you see totals, differences, or ratios without changing the original data.
When you want to find the total sales by adding sales from different regions.
When you need to calculate the profit by subtracting costs from revenue.
When you want to find the average price by dividing total sales by the number of items sold.
When you want to multiply quantity by unit price to get total value.
When you want to create a new field that shows percentage growth compared to last year.
Steps
Step 1: Click
- Data pane
The data fields list is visible on the left side.
Step 2: Right-click
- Data pane
A menu appears with options for creating new fields.
Step 3: Select
- "Create Calculated Field" from the menu
A dialog box opens to enter a formula for the new calculation.
Step 4: Type
- Calculation editor
You enter an arithmetic formula using existing fields and operators like +, -, *, /
💡 Use field names exactly as shown and surround them with square brackets if needed.
Step 5: Click
- "OK" button in the calculation editor
The new calculated field appears in the Data pane and can be used in views.
Step 6: Drag
- New calculated field to Rows or Columns shelf
The view updates to show the result of the arithmetic calculation.
Before vs After
Before
Data pane shows fields: Sales, Cost, Quantity
After
Data pane shows new field: Profit (calculated as Sales - Cost)
Settings Reference
Calculation editor
📍 Create Calculated Field dialog
To write arithmetic formulas combining fields and numbers.
Default: Empty formula
Field names
📍 Calculation editor
To correctly reference data fields in calculations.
Default: No brackets if simple names
Common Mistakes
Typing field names without brackets when they contain spaces
Tableau cannot recognize the field and shows an error.
Surround field names with square brackets, e.g., [Total Sales]
Using incorrect operators like 'x' for multiplication
Tableau only recognizes * for multiplication.
Use * symbol for multiplication in formulas.
Forgetting to click OK after typing the formula
The calculation is not saved and does not appear in the data pane.
Always click OK to save the calculated field.
Summary
Arithmetic calculations create new numbers by combining existing data fields with +, -, *, and /.
Use the Create Calculated Field option to write formulas in Tableau.
Remember to use square brackets for field names with spaces and correct operators.