Troubleshooting
Table Calculations
Master the art of diagnosing and fixing unexpected results from sort order, addressing, and partitioning in Tableau table calculations.
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.
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.
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.
The Fundamental Rule
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.
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
Step-by-Step Troubleshooting
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.
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.
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.
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.
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
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?