skip to content

Tableau

Tableau end to end: connecting data, building worksheets from dimensions and measures, calculations, dashboards, and publishing to Server. Interviewers use it to check you think in terms of the underlying data model, not just chart choices.

on this pageshow

explore

questions

page 1 of 2

In Tableau, what is the difference between a row-level and an aggregate calculated field?

level: juniorimportance: must knowfreq 76%

answer

  1. one runs per data row, one per mark
  2. the shelves decide how many rows survive
  3. cannot mix a SUM with a raw column
  4. ratio of sums, not average of ratios

basics

~20 s

A row-level calculation evaluates once per underlying data row and can be used as a dimension. An aggregate calculation such as SUM([Profit])/SUM([Sales]) evaluates once per mark, after Tableau groups rows to the view's level of detail.

solid answer

~40 s

A **row-level** calculation like `[Sales] - [Cost]` or `DATEDIFF('day', [Order Date], [Ship Date])` contains no aggregation, so Tableau evaluates it for every row of the data source — usually by pushing it into the query it sends — and the result behaves like any other field, including as a dimension. An **aggregate** calculation like `SUM([Profit]) / SUM([Sales])` evaluates once per mark, after rows are grouped to the dimensions in the view, so its value changes when you change the shelves. You cannot mix the two in one expression: `SUM([Sales]) - [Cost]` fails with "cannot mix aggregate and non-aggregate arguments", because one side has a value per mark and the other a value per row. Aggregate both sides, or aggregate the whole row-level expression.

code

text · 8 lines
text
// Row-level: one value per row of the data source
[Sales] - [Cost]

// Aggregate: one value per mark in the view
SUM([Sales]) - SUM([Cost])

// Illegal: one term is per mark, the other per row
SUM([Sales]) - [Cost]

go deeper

for a junior

Be ready to say that a formula without an aggregation runs per row and can be used as a dimension, while one with SUM or COUNTD runs once per mark. Recognise the "cannot mix aggregate and non-aggregate arguments" error and both ways to repair it.

for a middle

Explain the mechanics: row-level expressions are pushed into the query the data source runs, aggregates are computed at the view's level of detail, and non-linear expressions such as ratios give different answers depending on which side of the aggregation you compute them.

for a senior

Show that you audit dashboards for average-of-ratios bugs and can explain why a KPI disagrees with finance. Know that a filter on a row-level field and a filter on an aggregate remove different things, and that the choice changes every number on the sheet.

for a principal

Own the question of where each calculation should live. Repeated row-level logic that every workbook redefines belongs upstream in the model, not in a dozen workbook-local fields, and standardising ratio definitions is what stops two dashboards reporting different margins.

## What a calculated field is A calculated field in Tableau is a named formula saved in a workbook or a published data source. Tableau decides *when* to evaluate that formula from its contents: if the formula contains an aggregation function, it is an aggregate calculation and runs after grouping; if it does not, it is a row-level calculation and runs before grouping. Nothing in the dialog forces this choice — the formula you type decides it, which is why the distinction surprises people. ## Row-level calculations Examples: `[Sales] - [Cost]`, `UPPER([Customer Name])`, `IF [Discount] > 0 THEN 'Discounted' ELSE 'Full price' END`, `DATEDIFF('day', [Order Date], [Ship Date])`. Each of these produces one value for every row of the underlying data. Tableau normally pushes the expression into the SQL it sends to the data source (or, in an extract, can pre-compute it), so it costs little. Because a value exists per row, the field can be used exactly like a native column: - as a **dimension** that slices the view and groups marks; - inside an aggregation later, e.g. `SUM([Sales] - [Cost])`; - in a **dimension filter**, which removes rows before any aggregation happens. ## Aggregate calculations Examples: `SUM([Sales])`, `COUNTD([Customer ID])`, `SUM([Profit]) / SUM([Sales])`, `MAX([Order Date])`. These evaluate once per **mark**. A mark is defined by the view's *level of detail*: the combination of dimensions on Rows, Columns, Color, Size, Label, Detail and Tooltip. Put Region on Rows and you get one value per region; add Category and the same formula recomputes per region-and-category cell. The number is therefore a property of the view, not of the data alone. An aggregate result cannot be used as a grouping dimension, because it does not exist until the grouping has already happened. ## Why Tableau refuses to mix them `SUM([Sales]) - [Cost]` raises "Cannot mix aggregate and non-aggregate arguments with this function." The left term yields one number per mark; the right yields one number per row. There is no sensible way to subtract them, so Tableau blocks it rather than guessing. The two legal repairs are: - `SUM([Sales]) - SUM([Cost])` — aggregate both terms; - `SUM([Sales] - [Cost])` — do the arithmetic per row, then aggregate. For a linear expression like subtraction these give the same answer. For anything non-linear they do not, which leads to the classic mistake below. ## Ratio of aggregates versus average of ratios Suppose two orders: profit 1 on sales 10, and profit 4 on sales 90. - `AVG([Profit] / [Sales])` computes each row's ratio (10% and about 4.4%) and averages them: roughly 7.2%. - `SUM([Profit]) / SUM([Sales])` computes 5 / 100 = 5%. Both are arithmetically correct; only the second answers "what is our profit ratio?", because it weights each order by its size. Almost every business ratio — profit ratio, conversion rate, average order value — is a ratio of aggregates. Writing the row-level ratio and averaging it is one of the most common wrong numbers on a Tableau dashboard, and it is invisible unless someone checks a total by hand. ## Filters follow the same split A filter on a row-level field discards rows before aggregation, so the aggregates shrink. A filter placed on an aggregate — a measure filter such as `SUM([Sales]) > 1000` — discards whole marks after aggregation. Same dialog, very different effect on the numbers, and it follows directly from when each kind of calculation runs. ## Where the other two kinds fit Tableau has two more calculation kinds beyond these. A **level of detail expression**, written in braces such as `{FIXED [Customer ID] : SUM([Sales])}`, is an aggregate that declares its own grain instead of inheriting the view's. A **table calculation** such as `RUNNING_SUM(SUM([Sales]))` runs in Tableau on the aggregated result the query already returned. Both return aggregate values, so both obey the mixing rule. ## What interviewers listen for The short version they want: row-level runs per row in the database and can be a dimension; aggregate runs per mark and depends on the view. The follow-through they want: you can name the mixing error, you know both repairs, and you instinctively write a business ratio as a ratio of sums rather than an average of per-row ratios.

  • What exactly happens when you write SUM([Sales]) - [Cost] in a calculated field?
    Tableau refuses to save it with "cannot mix aggregate and non-aggregate arguments": one term produces a value per mark, the other a value per row. Fix it by aggregating both terms, `SUM([Sales]) - SUM([Cost])`, or by doing the arithmetic per row first, `SUM([Sales] - [Cost])`. For subtraction the two agree; for a ratio they do not.
  • Which of the two can you use as a dimension to group marks, and why?
    Only the row-level calculation. It has a value on every underlying row, so Tableau can group rows by it exactly as it groups by a native column. An aggregate calculation has no value until rows have already been grouped, so it lands in Measures and cannot define the grouping. The exception is a FIXED level of detail expression, whose result can be used as a dimension.
  • Where does a row-level calculation actually get computed?
    Normally in the data source: Tableau folds the expression into the SQL it generates, so the database does the work and only aggregated results come back. In an extract, deterministic row-level expressions can be pre-computed and stored, which makes them cheap to reuse. Aggregate calculations are computed in the query's grouping step, not per row.

A row-level calculation is a new column added to every line of a receipt; an aggregate calculation is the subtotal printed at the bottom of whichever group of receipts you happen to be holding.

saying these in an interview costs you the question

  • Assumes every calculated field is evaluated once per row
  • Writes a business ratio as an average of per-row ratios
  • Thinks wrapping a field in SUM is cosmetic
  • Tries to fix the mixing error by deleting the aggregation
  • Believes an aggregate calculation can be used as a dimension

context

open as a page

In Tableau, what is the difference between a live connection and an extract?

level: juniorimportance: must knowfreq 84%

basics

~20 s

A live connection sends generated queries to the source database every time a view renders, so it always shows current data. An extract is a snapshot of the data stored in Tableau's own columnar Hyper file, refreshed on a schedule.

open as a page

In Tableau, why does changing a parameter value not filter the view by itself?

level: juniorimportance: must knowfreq 78%

basics

~20 s

A Tableau parameter is a typed single-value variable, not a filter. It is bound to no field, so it changes nothing until something references it: a calculated field, a top-N setting, a bin size, a set condition, or a reference line.

open as a page

In Tableau, what's the difference between publishing a workbook and publishing a data source?

level: juniorimportance: must knowfreq 60%

basics

~20 s

Publishing a workbook uploads the sheets and dashboards, and by default a private copy of their connection and extract. Publishing a data source uploads the connection, model and extract on its own, so many workbooks share one governed, separately refreshed copy.

open as a page

In Tableau, what is the difference between a dimension and a measure?

level: juniorimportance: must knowfreq 85%

basics

~20 s

In Tableau, dimensions are categorical fields that slice a view and set its granularity; measures are numeric fields that get aggregated inside each slice, SUM by default. Any field can be converted between the two roles.

open as a page

In Tableau, how do FIXED, INCLUDE and EXCLUDE LOD expressions differ in granularity?

level: middleimportance: must knowfreq 82%

basics

~20 s

FIXED computes at exactly the dimensions listed and ignores the view. INCLUDE computes at the view's dimensions plus the ones listed, EXCLUDE at the view's dimensions minus them, so both move when the view changes.

open as a page

In a Tableau filter action, what do the three clearing-the-selection options do?

level: middleimportance: must knowfreq 58%

basics

~20 s

Leave the filter keeps the last selection applied after deselecting. Show all values drops the filter so the target shows everything. Exclude all values blanks the target until the user selects a mark, which is the usual cause of an empty-looking dashboard.

open as a page

In Tableau, how does a dashboard filter action differ from a highlight action?

level: middleimportance: must knowfreq 72%

basics

~10 s

A Tableau filter action removes non-matching rows from the target sheets, which re-queries them and changes their totals and axes. A highlight action keeps every mark and only emphasizes matching ones, dimming the rest.

open as a page

In Tableau, how does a relationship in the logical layer differ from a join?

level: middleimportance: must knowfreq 70%

basics

~20 s

A join flattens two tables into one wide result immediately, duplicating the coarser table's values. A relationship merges nothing up front: Tableau keeps each table at its own grain and generates a query per measure at the grain that measure belongs to.

open as a page

In Tableau, in what order are extract, data source, context, dimension and measure filters applied?

level: middleimportance: must knowfreq 68%

basics

~20 s

Extract filters run first, then data source filters, then context filters, then FIXED level-of-detail expressions, then dimension filters, then INCLUDE and EXCLUDE expressions, then aggregate measure filters, then table calculations and any filter on a table calculation.

open as a page

On Tableau Server, how is a capability resolved when one group allows it and another denies it?

level: middleimportance: must knowfreq 65%

basics

~20 s

A rule set directly on the user beats any group rule; among rules at the same level, Denied beats Allowed; a capability left Unspecified everywhere means no access. Site role, content ownership and project leader or administrator status override the result entirely.

open as a page

In Tableau, what changes when a field on Rows is discrete (blue) versus continuous (green)?

level: middleimportance: must knowfreq 70%

basics

~10 s

A discrete (blue) Tableau field draws headers and separate panes; a continuous (green) field draws an axis with a measurable range. The choice is independent of dimension versus measure, and dates can be either.

open as a page

In a Tableau dashboard, when should you use tiled layout instead of floating objects?

level: juniorimportance: should knowfreq 55%

basics

~10 s

Tiled objects snap into the layout tree and share space as the dashboard resizes, so tile by default and for anything that must reflow. Float only for deliberate overlays: legends, buttons, annotations, pop-up panels.

open as a page

In Tableau, when does a table calculation such as RUNNING_SUM actually compute?

level: middleimportance: should knowfreq 66%

basics

~20 s

Table calculations run inside Tableau on the aggregated result the data source already returned, after filters, level of detail expressions and aggregation. They can only see marks present in the view, and their direction depends on addressing and partitioning.

open as a page

In Tableau, when must you blend two data sources instead of joining them?

level: middleimportance: should knowfreq 55%

basics

~20 s

Blend when the sources cannot live in one Tableau data source — most commonly when one of them is an already-published Tableau data source. Blending links them per worksheet, aggregating the secondary source to the linking fields before combining.

open as a page

In Tableau, how does an aggregate filter on SUM(Sales) differ from a dimension filter?

level: middleimportance: should knowfreq 52%

basics

~20 s

A dimension filter removes underlying rows before aggregation, like SQL WHERE. An aggregate filter on SUM(Sales) is evaluated after aggregation at the view's level of detail, like HAVING, so it removes marks and its meaning changes when the view's grain changes.

open as a page

In Tableau, why does a Top 10 Customers filter plus a Region filter show fewer than 10 customers?

level: middleimportance: should knowfreq 60%

basics

~20 s

Both are dimension filters, applied at the same stage, so neither sees the other. Tableau picks the top ten across all regions and then intersects that list with the chosen region, leaving only the ones that overlap.

open as a page

In Tableau Server, when would you use a data-driven alert instead of a subscription?

level: middleimportance: should knowfreq 42%

basics

~20 s

Use a subscription for a scheduled snapshot people read on a rhythm; use a data-driven alert when the point is a threshold — it emails only when a numeric value in the view crosses the condition, so quiet days produce no mail.

open as a page

In Tableau, what determines how many marks a worksheet draws?

level: middleimportance: should knowfreq 55%

basics

~20 s

A Tableau worksheet draws one mark per distinct combination of the dimensions present in the view — on Rows, Columns, Pages and every Marks card property, including Detail. Measures never add marks; they are aggregated within each one.

open as a page

In Tableau, why do bars stack when you drop a dimension on Color?

level: middleimportance: should knowfreq 45%

basics

~20 s

With a Bar mark, Tableau stacks segments by default once a dimension on the Marks card splits each bar, so the full bar length stays the category total. Analysis then Stack Marks switches stacking off or on.

open as a page

Why does a Tableau FIXED LOD ignore a dimension filter but honour a context filter?

level: seniorimportance: should knowfreq 60%

basics

~20 s

Tableau applies context filters before it evaluates FIXED level of detail expressions and ordinary dimension filters after, so only the earlier ones can change what a FIXED expression sees. INCLUDE and EXCLUDE are evaluated after dimension filters and do respond to them.

open as a page

In Tableau, why does wrapping a FIXED LOD in SUM instead of AVG change the answer?

level: seniorimportance: should knowfreq 52%

basics

~20 s

A level of detail expression returns an aggregate at its own grain, and the view aggregates that result again to produce one number per mark. SUM adds those values, AVG averages them, and when the expression is coarser than the view its value repeats and SUM inflates it.

open as a page

Why does a Tableau filter action fail to filter a target sheet on a different data source?

level: seniorimportance: should knowfreq 48%

basics

~20 s

Filter actions match on field values, not on identity. Across two data sources the field names usually differ, so All Fields matches nothing and you must map Selected Fields — and even then the values must match exactly in spelling, case, type and grain.

open as a page

Why does a Tableau dashboard with many worksheets and filter actions respond slowly to clicks?

level: seniorimportance: should knowfreq 42%

basics

~20 s

Each worksheet issues its own queries, and a filter action re-queries every target sheet on every interaction. A dashboard of a dozen sheets all targeted by Use as Filter produces a dozen query rounds per click, plus filter cards that query for their own values.

open as a page

In Tableau, is a data source filter enough to stop users seeing rows they shouldn't?

level: seniorimportance: should knowfreq 38%

basics

~20 s

No. A data source filter constrains the queries a workbook sends, but anyone allowed to web-edit or download the workbook or data source can remove it. Real row restriction needs the rows excluded at extraction, enforced at the database, or applied by a policy the viewer cannot edit.

open as a page

A published Tableau extract refresh shows a green tick, yet a workbook built on it is still missing rows that changed upstream — how do you track down where the data is being lost?

level: seniorimportance: should knowfreq 42%

basics

~20 s

Establish which data source the workbook actually queries, then compare its last-refresh time and row counts against the source. The usual causes are an incremental refresh that only appends new rows, an extract filter or aggregation, a workbook bound to a different embedded extract, or source data that had not landed when the refresh ran.

open as a page

In Tableau, a live-connection dashboard with six filter cards loads slowly — what do you change?

level: seniorimportance: should knowfreq 46%

basics

~20 s

Each filter card issues its own query to populate its list of values, and Only Relevant Values makes those queries depend on each other. Cut the number of cards, add an Apply button, replace high-cardinality lists with parameters or wildcard search, and push permanent exclusions into data source or extract filters.

open as a page

In Tableau Cloud, what identity does a scheduled data source refresh use to reach the database?

level: seniorimportance: should knowfreq 45%

basics

~20 s

A scheduled refresh runs unattended, so it uses the credentials embedded in the published data source or workbook — one fixed database identity, not the viewer's. If those belong to a person, password rotation or offboarding breaks every dashboard behind them.

open as a page

In Tableau, why does a Grand Total row differ from the sum of the rows above it?

level: seniorimportance: should knowfreq 50%

basics

~10 s

A Tableau grand total re-applies the aggregation to all underlying rows in scope rather than adding up the displayed values, so SUM agrees but COUNTD, AVG, MIN, MAX and ratios legitimately differ.

open as a page

How would you structure Tableau Server projects and permissions for self-service across many teams?

level: principalimportance: should knowfreq 32%

basics

~20 s

Shape projects around ownership, not chart topics: a sandbox and a certified project per team, permissions locked at the project and granted only to identity-provider-backed groups, publishing limited to named authors, and separate sites reserved for genuine isolation.

open as a page

showing 1–30 of 36