01 / 20

Troubleshooting
Table Calculations

Master the art of diagnosing and fixing unexpected results from sort order, addressing, and partitioning in Tableau table calculations.

Tableau

What Are Table Calculations?

Table calculations are computations that Tableau applies after the initial query returns data. Unlike row-level calculations, they operate on the visible results in your view: the marks already drawn on screen.

Row-Level Calc
Evaluated per row in the data source before aggregation. Tableau sends it to the database.
Table Calc
Evaluated on aggregated results already in the view. Runs locally in Tableau's cache.

Why Do They Break?

Table calculations depend on the structure of the view: which fields sit on rows and columns, how data is sorted, and which dimensions are used for addressing versus partitioning. Change any of these and the result can shift dramatically.

Sort / Order Row sequence Addressing Direction of travel Partitioning Reset boundaries Unexpected Table Calc Results Wrong totals, flipped ranks, broken running sums

Addressing vs Partitioning

Every table calculation splits the dimensions in your view into two groups. Understanding this split is the single most important skill for troubleshooting.

Addressing (Compute Using)
The dimensions the calculation moves through. Think of it as the direction of travel: "compute using Month" means the calc walks month by month.
Partitioning (Restart For)
The dimensions that define independent groups. The calculation restarts at each new partition value: a new region, a new category.

The Fundamental Rule

Addressing Month Quarter (direction of travel) Partitioning Region Category (reset boundaries) + = All Dimensions in the View

How Sort Order Changes Results

Table calculations traverse marks in a specific sequence. If you sort a dimension differently, the calculation visits marks in a new order and produces different values.

Sorted A → Z Product Running Sum Chairs 120 Desks 320 Tables 570 INDEX Sorted by Sales ↓ Product Running Sum Tables 250 Desks 450 Chairs 570 ≠ Same data, different sort → different running sums The intermediate values change even though the grand total is identical

Table (Across) vs Table (Down)

The most common quick-table-calc settings control which direction Tableau traverses your crosstab. Mixing them up is the fastest way to get wrong numbers.

Table (Across) Table (Down)
Direction Left → Right Top → Bottom
Addressing Column dimensions Row dimensions
Partitioning Row dimensions Column dimensions
Restarts At each new row At each new column
Best for Compare across time periods Compare within a category list

Visualizing Addressing Direction

Q1 Q2 Q3 Q4 East 50 120 200 310 Table (Across) → Running Sum resets per row West 30 90 180 260 Table (Down) → Running Sum resets per column

Step-by-Step Troubleshooting

1
Identify the calculation type. Right-click the pill and confirm it is a table calc (indicated by a delta triangle icon).
2
Open "Edit Table Calculation." Check which dimensions are in Addressing (Compute Using) and which are in Partitioning.
3
Check the sort order. Is the view sorted by a field, by SUM(Sales), or manually? The traversal sequence follows this sort.
4
Verify with INDEX(). Place INDEX() on the view as a text mark to visualize the exact traversal order Tableau uses.
5
Switch to "Specific Dimensions." Instead of "Table (Across)" or "Table (Down)", use explicit dimension selection for full control.

Example 1: Running Sum Gone Wrong

You build a crosstab with Region on Rows and Month on Columns, then add a Running Sum of Sales. It shows cumulative values within each region. But when a colleague sorts Months by descending sales, the running sum breaks.

Before: Jan → Dec Jan Feb Mar 100 250 400 ✓ Correct: 100 → 250 → 400 Accumulates chronologically After: By Sales ↓ Mar Feb Jan 150 300 400 ✕ Wrong: 150 → 300 → 400 Accumulates by sales magnitude Fix: lock the sort to chronological, or use Specific Dimensions

Example 2: Percent of Total Scope

You want each cell to show its percentage of the column total. But Tableau defaults to "Table (Across)", calculating percent of the row total instead. The numbers add up to 100% in the wrong direction.

✕ Table (Across) Q1 Q2 East 54% 46% = 100% West 45% 55% = 100% ✓ Table (Down) Q1 Q2 East 60% 52% West 40% 48% 100% 100% Fix: Change "Compute Using" to Table (Down)

Example 3: RANK with Multiple Dimensions

You have Category and Sub-Category on Rows, and you add RANK(SUM(Sales)). You expect ranks 1-5 within each Category, but instead get a global rank 1-17 across all sub-categories.

✕ Default (Table Down)
Addressing = Category + Sub-Category. No partitioning. RANK runs across the entire table: 1, 2, 3, ..., 17.
✓ Fixed (Specific Dims)
Addressing = Sub-Category only. Partition by Category. RANK restarts for each category: 1, 2, 3 ... then 1, 2, 3 ... again.

The INDEX() Debugging Trick

INDEX() returns the position of the current mark in the table calc traversal. It is the single best tool for understanding what Tableau is doing under the hood.

1
Create a calculated field: just type INDEX().
2
Drag it to Text or Color. You'll see numbers like 1, 2, 3... showing the order Tableau visits each mark.
3
Match it to your table calc. Right-click INDEX() and set it to the same Compute Using as your actual calculation.
4
Look for resets. If INDEX() resets to 1, that's where a new partition starts.

Specific Dimensions vs Quick Presets

Tableau offers two ways to configure addressing. Quick presets are convenient but fragile. Specific Dimensions give you full control.

Quick Presets Specific Dimensions
Setup time One click A few clicks
Robustness Fragile: breaks when you add/remove pills Stable: explicitly names dimensions
When to use Quick exploration, single dimension on each shelf Final dashboards, complex views, multiple dimensions
Sort sensitivity High: follows visual sort Lower: you can also set sort order within the calc

Common Mistakes

✕ Ignoring Default Addressing
Dropping a Quick Table Calc and never checking which direction it computes. The default often picks "Table (Across)" when you need "Table (Down)".
✕ Sorting After Adding the Calc
Adding a running sum with correct results, then sorting by a different field. The sort silently reorders the traversal and changes every value.
✕ Adding Dimensions Without Rechecking
Dragging a new dimension onto the view causes Tableau to redistribute addressing and partitioning. Your carefully configured calc may silently break.

Question 1 of 5

A RUNNING_SUM is computed using "Table (Across)". In which direction does Tableau traverse the marks?

Question 2 of 5

You have Region on Rows and Month on Columns. You want a running sum that restarts for each region. Which configuration is correct?

Question 3 of 5

A colleague changes the sort on your view from alphabetical to descending by sales. Your RUNNING_SUM values changed. Why?

Question 4 of 5

What is the primary purpose of using INDEX() when troubleshooting a table calculation?

Question 5 of 5

You add a new dimension to the Columns shelf. Your previously correct RANK calculation now shows wrong values. What most likely happened?