0
0
Tableaubi_tool~5 mins

Why calculations extend data analysis in Tableau - Why Use It

Choose your learning style9 modes available
Introduction
Calculations in Tableau let you create new data from your existing data. This helps you answer questions that the original data alone cannot. Calculations extend your analysis by adding custom numbers, comparisons, or conditions.
When you want to find the profit margin by subtracting costs from sales.
When you need to classify customers as high or low spenders based on their purchase amount.
When you want to calculate the percentage growth of sales over time.
When you want to combine two text fields into one, like first and last names.
When you want to filter data dynamically based on a calculation, like showing only top 10 products.
Steps
Step 1: Click
- Analysis menu
A dropdown menu appears with calculation options
Step 2: Select
- Create Calculated Field
A dialog box opens for entering your calculation formula
Step 3: Type
- Calculation editor
You enter a formula like [Sales] - [Cost]
💡 Use the fields list on the right to drag fields into your formula
Step 4: Click
- OK button in the calculation dialog
The new calculated field appears in the Data pane under Dimensions or Measures
Step 5: Drag
- New calculated field to Rows or Columns shelf
The view updates to show data based on your calculation
Before vs After
Before
The view shows total sales and total cost for each product.
After
The view shows profit calculated as sales minus cost for each product.
Settings Reference
Calculation Type
📍 Calculation editor
Defines the kind of calculation you want to create
Default: Basic arithmetic
Aggregation
📍 Data pane for calculated field
Controls how the calculation aggregates data in the view
Default: Sum
Calculation Scope
📍 Calculation editor
Determines if calculation works on each row or on aggregated data
Default: Row-level
Common Mistakes
Using field names incorrectly in the calculation formula
Tableau requires exact field names enclosed in square brackets; otherwise, the calculation fails.
Always select fields from the list or type them exactly as shown with square brackets, e.g., [Sales]
Creating a calculation but forgetting to add it to the view
Calculations do not affect the view until you place them on shelves or use them in filters or marks.
Drag the calculated field to Rows, Columns, Filters, or Marks to see its effect
Summary
Calculations let you create new insights by transforming your data.
They help answer questions that raw data alone cannot solve.
Remember to use correct field names and add calculations to your view to see results.