0
0
Tableaubi_tool~7 mins

Custom table calculation scope in Tableau - Step-by-Step Guide

Choose your learning style9 modes available
Introduction
Custom table calculation scope lets you control how Tableau calculates values across your data. It helps you decide which parts of your table to include when doing calculations like running totals or percent of total.
When you want to calculate a running total only within each region, not across all regions.
When you need to show percent of total sales by category but reset the total for each year.
When you want to rank products within each category separately.
When your dashboard needs to compare values across columns but not rows.
When you want to customize how subtotals or grand totals are calculated in a table.
Steps
Step 1: Right-click
- the measure field in the view
A menu appears with calculation options
💡 Make sure your measure is already in the view
Step 2: Select
- Add Table Calculation
The Table Calculation dialog box opens
Step 3: Choose
- Calculation Type dropdown
You see options like Running Total, Percent of Total, Rank, etc.
Step 4: Click
- Customize button next to Compute Using
Options to set the scope and direction of the calculation appear
Step 5: Select
- Specific dimensions or Table (Down, Across) options
Tableau adjusts how it calculates the values based on your selection
💡 Use 'Specific Dimensions' to pick exactly which fields define the calculation scope
Step 6: Click
- OK button
The table calculation applies with your custom scope
Before vs After
Before
Running total calculated across all rows ignoring regions, showing cumulative sales for all data combined
After
Running total calculated separately within each region, showing cumulative sales restarting at zero for each region
Settings Reference
Calculation Type
📍 Table Calculation dialog box
Defines the type of calculation Tableau performs on the data
Default: Running Total
Compute Using
📍 Table Calculation dialog box
Controls the direction and scope of the calculation across the table
Default: Table (Down)
Specific Dimensions
📍 Compute Using options in Table Calculation dialog
Lets you pick exactly which dimensions define the calculation scope
Default: All dimensions checked
Common Mistakes
Not setting the calculation scope correctly, causing totals to run across the entire table instead of within groups
This leads to misleading results because the calculation ignores natural data groups like regions or categories
Use 'Specific Dimensions' in Compute Using to limit the calculation to the desired groups
Choosing the wrong direction (Down vs Across) for the calculation
The calculation may run horizontally when you expect it vertically, or vice versa, causing incorrect results
Understand your table layout and select the Compute Using option that matches the direction of your data
Summary
Custom table calculation scope controls which parts of your data Tableau uses for calculations.
You can choose specific dimensions and directions to get accurate running totals, ranks, and percentages.
Always check your calculation scope to avoid misleading results in grouped data.