cswork / libraryOpen practice workspace

Articles

Tableau Table Calculation Interview Questions: Addressing, Partitioning, and Totals

Practise Tableau table calculation interview questions with running totals, addressing, partitioning, filters, LOD comparisons, and worked examples.

A Tableau table calculation computes over the marks in a view, so the view is part of the calculation. If a running total changes after you add Region or rearrange Month, do not assume the formula broke. First inspect addressing, partitioning, sort order, and the level of detail of the marks.

That is the central skill behind Tableau table calculation interview questions. You need to explain which marks participate, in what order, and where the calculation restarts. This guide uses small original examples so you can verify results by hand before opening a complex dashboard.

Key takeaways

  • Addressing defines how a calculation moves through marks.
  • Partitioning defines independent groups within which it runs.
  • Compute Using is part of the answer, not a cosmetic setting.
  • Filters can change the inputs or merely hide calculated results, depending on their type.
  • A meaningful grand total is not always the sum of the displayed numbers.

What are addressing and partitioning in Tableau?

Think of a running total by month for each region. Month is the addressing dimension: the calculation moves through months in order. Region is the partitioning dimension: each region gets a separate running series.

In Specific Dimensions, checked dimensions are used for addressing and unchecked dimensions define partitioning. With multiple addressing fields, their order and any restart setting also matter. Explain the exact configuration rather than saying “Table Across” without describing the layout. Tableau's table calculation reference.

Business questionAddress byPartition by
Cumulative sales over months for each regionMonthRegion
Accumulate regions within each monthRegionMonth
Rank products separately in each categoryProductCategory

The same formula can answer different questions under different settings. In an interview, state the business sentence first, then identify the fields needed to make the calculation match that sentence.

How does a running total work? A six-row example

Use this deliberately small dataset. The intended result is cumulative sales within each region, ordered by month.

RegionMonthSalesExpected running total
EastJan1010
EastFeb2030
EastMar535
WestJan77
WestFeb815
WestMar1530
RUNNING_SUM(SUM([Sales]))

The inner SUM aggregates source records to each mark. The outer RUNNING_SUM accumulates those mark values in the configured direction. For this example, address Month in chronological order and partition by Region. East ends at 35 and West at 30.

If you address Region and partition by Month instead, January accumulates 10 and then 7 across the regions, producing 10 and 17 in that order. It is a valid computation, but it answers a different question. Naming that distinction is more useful than calling the result “wrong” without explaining why.

A hand-checked baseline makes scope mistakes much easier to spot.

Why does my running total reset when I add a dimension?

A new dimension can change the marks, the partitions, or both. Adding Product to Detail may split one month-region mark into many product marks even if the visible axes look unchanged. The calculation then operates over a different table of marks.

Debug in this order:

  1. List all dimensions on Rows, Columns, and the Marks card.
  2. Identify the intended grain of one mark.
  3. Inspect Compute Using and Specific Dimensions.
  4. State which fields should define independent groups.
  5. Verify addressing order, sort, and restart behavior.
  6. Compare against the tiny expected-result table.

Do not add a second table calculation as a patch before understanding the first. A plausible-looking chart can still accumulate across products when the business asked for months.

Why does sorting change the answer?

Some table calculations depend on traversal order. A running total by chronological month and a running total after sorting months by sales are different sequences. Difference-from-previous also needs a precise definition of “previous.”

Using East's sales of 10, 20, and 5, chronological accumulation is 10, 30, 35. If the view instead traverses sales in descending order, the running sequence is 20, 30, 35. The final total matches, but the intermediate story does not.

In a time-series dashboard, use a real date field with the intended granularity and verify its ordering. Month names stored as text can accidentally sort alphabetically. Also check whether “Month” means a date across years or a date part combining all Januaries.

How do I calculate percent of total?

SUM([Sales]) / TOTAL(SUM([Sales]))

The denominator depends on the partition. For the six-row example, total sales are 65. East January's 10 represents about 15.38% of all sales, but about 28.57% of East's 35. Both percentages are correct under different questions.

Before configuring the calculation, complete the sentence: “This mark as a percentage of ___.” Fill the blank with all visible regions and months, one region, one month, or another explicitly defined scope. Then configure the partition and validate the denominator.

Handle an empty or zero denominator according to the reporting contract. Do not silently convert an undefined percentage into zero just to remove a blank. A blank, a zero, and no underlying records can communicate different things.

How do filters affect table calculations?

A regular dimension filter can remove marks before a table calculation is computed. A table-calculation filter is evaluated later and can hide marks without removing their contribution to the calculation. This distinction matters when you want to display recent months while retaining an earlier running-total baseline.

For East, hiding January after computing the running total should leave February at 30. Removing January before computation makes the visible sequence start from February's 20. Decide which result the user needs before choosing the filter.

Filter order has additional details for context filters, data-source filters, and LOD expressions. Build a minimal example with one filter at a time. Do not assume every filter on the dashboard changes the denominator in the same way.

What happens when a month is missing?

A missing mark is not necessarily a zero-valued month. If January and March are present but February is absent, “previous” may refer to the previous available mark rather than the previous calendar month.

Ask whether the business expects a continuous calendar and whether the data model or view supplies it. A date scaffold or appropriate domain completion may be needed. A null-handling function can replace a null value, but it does not necessarily create a missing date row. Verify the actual marks before explaining the calculation.

Table calculation or FIXED LOD: which should I use?

NeedLikely starting pointQuestion to verify
Running sum across displayed monthsTable calculationWhat is the addressing order?
Rank within a displayed paneTable calculationWhich marks share a partition?
Metric at a defined customer grainLOD expressionWhich filters should affect it?
Per-record transformationRow-level calculationWhat aggregation is needed later?

A FIXED expression defines a grain; it is not simply a table calculation that ignores the view. Its interaction with filters follows Tableau's order of operations. The right choice begins with the metric's definition and required filter behavior, not with whichever expression is shortest.

Why is the grand total different from adding visible cells?

First ask whether adding the displayed cells is meaningful. Summing a running total of 10, 30, and 35 gives 75, but East's actual sales are 35. The running total already includes earlier values repeatedly. A grand total of cumulative figures is not automatically a useful business measure.

Ratios are another trap. If one group converts 1 of 2 visitors and another converts 9 of 90, averaging the displayed rates gives 30%. The combined conversion rate is 10 of 92, about 10.87%. The total must reflect the chosen metric definition, not an arbitrary aggregation of formatted cells.

Tableau's total behavior also depends on the calculation and configuration. Inspect detail, subtotals, and grand totals separately. If a total has no useful meaning, explain why and consider displaying a separately defined summary metric.

How should I answer a Tableau debugging interview?

Use a short sequence: clarify the business question, identify mark grain, inspect addressing and partitioning, verify sort and filters, then compare a hand-calculated sample. State the expected result before changing a setting.

For a mock exercise, build the six-row view, add Category, change the sort, filter January, and enable a total. Predict each result before clicking. Keep an error log that names the cause: wrong partition, wrong order, missing mark, different denominator, or inappropriate total.

Quick follow-up answers

Is Table Across always the right choice for months? No. It depends on where the fields appear and what the calculation should traverse. Explicit field-based settings are often easier to explain and maintain.

Why did rank change after adding Category? The candidate set or partitions may have changed. Clarify whether the requirement is global rank or rank within each category.

Should the total of ranks equal the number of records? Not generally. Ranks describe ordering, and ties change rank sequences. Define a useful summary instead of assuming ranks are additive.

What is the best preparation habit? Test each calculation on a dataset small enough to solve without Tableau. Once the scope is correct, scale up the view.