In Tableau, when must you blend two data sources instead of joining them?
answer
- combined in the view, not in the model
- one source leads, the other follows
- it is a per-worksheet arrangement
- the follower arrives already aggregated
- a published data source cannot be joined
basics
~20 sBlend 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.
solid answer
~50 sA join or a cross-database join needs both tables inside one Tableau data source. When that is impossible — the clearest case being a **published Tableau data source**, which cannot participate in a cross-database join — blending is the remaining option. A blend is defined per worksheet, not in the model: one source is **primary** (it defines the view), the others are **secondary**, and they are linked on fields the two share. Tableau queries each source separately, aggregates the secondary to the level of the linking fields, then combines the aggregated result into the view left-join-style from the primary. That is the key cost: secondary fields arrive already aggregated, so you cannot use them at row level, unmatched primary rows show nulls, and the relationship exists only on the sheets where you set it up. Prefer a relationship or join when the data can be modelled together.
go deeper
Know that blending combines two data sources on a worksheet by linking shared fields, and that one source leads while the other is matched into it.
Explain the mechanics: separate queries per source, the secondary aggregated to the linking fields, left-join-style matching from the primary, and the per-sheet scope that follows from it.
Diagnose wrong blended numbers by checking primary choice, active linking fields and grain, and know when the durable fix is publishing one modelled data source instead.
Decide when analyst-level blending is acceptable at all: a blend is an undocumented model living in one worksheet, so set the threshold at which the pairing must become a governed, published data source instead.
## What blending actually is Data blending combines results *in the view*, after the fact, rather than combining rows in the data source. You designate one data source as the **primary** for a worksheet — in practice, the first one you use on that sheet — and any other as **secondary**. Tableau links them on one or more fields that appear in both, shown as a link icon in the data pane. You can accept the automatic link on identically named fields or edit the relationship to choose the fields yourself. At query time Tableau issues **separate queries**: one to the primary, one to each secondary. The secondary query aggregates its data **to the level of the linking fields**. Those aggregated results are then matched to the primary's rows, left-join-style from the primary. Everything about blending follows from that sentence. ## When you have no choice The strongest case is a **published Tableau data source**. A published data source cannot be combined with another connection through a cross-database join; if you want to put a certified, governed source next to a local spreadsheet, blending is how. Some connection types, notably multidimensional (cube) sources, likewise cannot be joined and must be blended. The softer case is grain. Sometimes you have a fact table at transaction grain and a target or quota table at month-and-region grain, and you do not want to pollute the model with a join that repeats targets across transactions. A blend keeps the primary intact and brings the target in already aggregated. ## What blending costs you **Secondary measures are always aggregated.** You are receiving an aggregate, not rows, so a row-level calculation mixing a primary field and a secondary field is not available. Level-of-detail expressions cannot be authored against a blended secondary source in the way they can within one data source. **It is per-worksheet.** A blend is not part of the model. Set it up on one sheet and the next sheet knows nothing about it — including a new sheet built by a colleague, who may pick the opposite primary and get different results. This is the reason blends age badly in shared workbooks. **Primary-driven matching.** Only primary rows appear. If the primary has no row for a region, that region's secondary values are invisible, no matter how much data the secondary holds. Conversely, primary rows with no secondary match show null for secondary fields. Swapping which source is primary can change the answer, which surprises people. **Linking-field granularity governs correctness.** The secondary is aggregated to whatever linking fields are active. If the linking fields are coarser than the view, secondary values repeat across the finer rows; if you then aggregate them again, you double-count. A great deal of "the blended number is wrong" traces to exactly this. **Filters do not travel.** A filter applied to the primary does not automatically apply to the secondary's query; you generally have to filter both sides, or use the linking fields to constrain the secondary. ## How it compares to the alternatives A **join** (physical layer) flattens rows before any query runs and can duplicate values from the coarser table. A **relationship** (logical layer) keeps each table at its own grain and lets Tableau aggregate each measure correctly at query time, within a single data source. A **cross-database join** is still a join — it merges tables from different connections, but Tableau's own engine performs the merge. A **blend** is the only one that combines *results* rather than rows, and the only one scoped to a worksheet rather than the model. The practical ordering: model it together with relationships if you can; use a join when the tables are one entity; use a cross-database join when the connections allow it; blend when nothing else will combine the sources, or when you deliberately want the secondary pre-aggregated. ## Diagnosing a suspicious blend Check which source is primary and whether that is intentional. Check the active linking fields — the link icons show which are engaged — and ask what grain the secondary is being aggregated to. Reproduce each side separately: build a sheet from the primary alone and one from the secondary alone, and confirm the individual totals before trusting the combined ones. If the two sources should really be modelled together, the durable fix is to publish a data source that contains both rather than teaching every analyst the blend.
- Why can swapping which source is primary change the numbers in a blend?The primary defines the rows in the view and the secondary is matched into them left-join-style. Values that exist only in the secondary never appear, and the secondary is aggregated to the linking fields rather than the other way round. Swapping the roles therefore changes both which rows survive and which side gets pre-aggregated.
- A blended target value repeats across every transaction row and the total is far too high. What happened?The linking fields are coarser than the view. The secondary's target is aggregated to, say, region and month, then shown against each finer row, and summing those repeated values multiplies the target. Fix it by matching the view's grain to the linking fields, or by aggregating the target with a function that does not re-add repeats.
saying these in an interview costs you the question
- Describes a blend as just a join between data sources
- Expects to use secondary fields at row level
- Assumes a primary filter also filters the secondary source
- Thinks a blend is stored in the model and applies everywhere
- Ignores that rows missing from the primary never appear