01 / 20

Data Blending
in Tableau

Learn how to combine data from multiple sources using Tableau's data blending feature, understand its architecture, and know when to use it versus other methods.

Tableau

What Is Data Blending?

Data blending is a method of combining data from two or more data sources directly on a single Tableau worksheet. Unlike joins that happen at the database level, blending works at the visualization level: each data source runs its own query, and Tableau merges the results using a linking field.

Primary vs Secondary Data Sources

Primary Source
The first data source you use on a worksheet. Tableau sends a full query and returns all matching rows. Shown with a blue checkmark icon in the Data pane.
Secondary Source
Any additional data source on the same sheet. Tableau sends a separate query and aggregates results before blending. Shown with an orange checkmark icon.

Why Does Blending Matter?

Cross-Database Analysis
Combine data from SQL Server, Excel, and Google Sheets on one chart without ETL pipelines.
Different Granularities
Safely blend daily sales data with monthly targets without row duplication errors.
Quick Prototyping
Test analytical ideas without modifying the underlying database or building complex data models.

How Blending Works

Primary Source Full query → all rows Secondary Source Separate query → agg Blend Engine LEFT JOIN on link field Link Visualization Merged result STEP 1: Separate queries STEP 2: Aggregate + match STEP 3: Display

The Linking Field

A linking field is the common dimension that Tableau uses to match rows between the primary and secondary data sources. It acts as the "key" that connects the two queries.

Sales Data (Primary) Region Revenue East $50,000 West $75,000 South $30,000 Targets (Secondary) Region Target East $60,000 West $70,000 LINK Blended Result: LEFT JOIN on Region South shows null for Target (no match in secondary)

Blending vs Joining

Data Blending Data Joining
Where it happens Visualization layer Data source layer
Data sources Can be from different databases Must be from same connection
Join type LEFT JOIN only Inner, Left, Right, Full Outer
Aggregation Secondary is pre-aggregated Row-level data preserved
Scope Per worksheet Entire workbook
Performance Slower for large data Generally faster

When to Use Data Blending

1
Different database types: Your sales data is in SQL Server but your budget targets live in an Excel spreadsheet.
2
Mismatched granularity: One source has daily transactions, the other has monthly quotas. Blending prevents row duplication.
3
No database admin access: You cannot create views or modify schemas, so you blend at the Tableau level instead.
4
Published data sources: You need to combine a published extract on Tableau Server with a local file.

How to Set Up a Blend

1
Connect to both sources: Add each data source to your workbook via Data → New Data Source.
2
Drag the first field: The source of the first field you place on the sheet becomes the primary.
3
Set the linking field: Tableau auto-detects matching field names. Click the chain link icon to activate or edit.
4
Drag secondary fields: Switch to the secondary source and drag measures or dimensions onto the view.
5
Verify the blend: Check for asterisks (*) on secondary field pills, indicating that data is being aggregated.

Example 1: Sales vs Targets

A retail company stores daily sales in a SQL database and quarterly targets in Excel. The manager wants a single bar chart comparing actual revenue to targets by region.

$100K $75K $50K $0 East West South Actual (Primary) Target (Secondary)

Example 2: Multi-Link Blending

Sometimes you need multiple linking fields. A school district blends student test scores (SQL) with demographic data (CSV). They link on both Student ID and School Year to avoid mismatches across years.

Test Scores (SQL) Student ID School Year Math Score Reading Score Demographics (CSV) Student ID School Year Grade Level Lunch Status Link 1 Link 2

Example 3: Aggregation Impact

Understanding how the secondary source gets aggregated is crucial. Consider blending daily web traffic (primary) with monthly ad spend (secondary), linked by Month.

Secondary (Raw) Month Ad Spend Jan $5,000 Jan $3,000 Feb $7,000 SUM After Aggregation Month SUM(Ad Spend) Jan $8,000 Feb $7,000 Two Jan rows in the secondary → aggregated to $8,000 The primary still has all its daily Jan rows intact Each daily row in primary sees $8,000 for Jan Ad Spend

Limitations of Data Blending

1
LEFT JOIN only: You cannot do inner, right, or full outer joins. Unmatched secondary rows are silently dropped.
2
Secondary is always aggregated: You lose row-level detail from the secondary source. No row-level calculations across sources.
3
No LOD expressions on secondary: FIXED, INCLUDE, and EXCLUDE calculations cannot reference blended fields.
4
Per-worksheet scope: Each sheet defines its own blend. You must reconfigure linking on every new worksheet.
5
Performance cost: Blending runs separate queries and merges in Tableau, which is slower than a single database join.

Common Mistakes

✕ Wrong Primary Source
Dragging a field from the wrong source first. The source with finer granularity should usually be primary.
✕ Missing Link Field
Forgetting to activate the chain link icon. Fields with different names are not auto-linked and must be set manually.
✕ Ignoring Aggregation
Expecting row-level data from the secondary. All secondary measures are aggregated (SUM, AVG, etc.) before blending.

Summary Comparison Table

Blending Joining Relationships
Introduced Tableau 6+ Tableau 6+ Tableau 2020.2+
Cross-database ✓ Yes ✕ No ✓ Yes
Row-level detail Primary only ✓ Both ✓ Both
LOD expressions ✕ Limited ✓ Full ✓ Full
Duplication risk Low High (mismatched grain) Low
Recommended use Different DBs, quick prototyping Same DB, same grain Default for most cases

Question 1 of 5

In Tableau data blending, what determines which data source becomes the primary source?

Question 2 of 5

What type of join does Tableau use when blending data from a secondary source?

Question 3 of 5

Which of the following is a limitation of data blending in Tableau?

Question 4 of 5

A company has daily order data in PostgreSQL and monthly budget targets in Google Sheets. Why would blending be preferred over joining?

Question 5 of 5

An analyst sets up a blend but notices null values appearing for the secondary source's measure. Which of the following is the most likely cause?