Tableau Lesson 14 – Relationships | Dataplexa
Section II — Lesson 14

Relationships in Tableau

Relationships are Tableau's modern approach to combining tables — smarter than joins because they preserve each table's natural granularity and prevent the row duplication that makes joined aggregates go wrong.

What Relationships Are

A Relationship tells Tableau that two tables are connected through a shared field — without physically merging their rows into one flat table. Tableau keeps each table separate and only combines the relevant rows at query time, based on exactly which fields you use in each worksheet.

This on-demand approach solves the biggest problem with traditional joins: the fan-out. When you join an Orders table (one row per line item) to a Returns table (one row per returned order), a join can multiply rows if a key appears more than once in either table — inflating every aggregate. Relationships avoid this entirely by querying each table at its own natural grain.

Relationships vs Joins — Side by Side

Relationships
Tables stay at their own granularity — no row multiplication
No join type to choose — Tableau handles it contextually per worksheet
Measures from different tables aggregate correctly side by side
Tableau's recommended default since version 2020.2
Joins
Merges rows into a single flat table upfront
Requires choosing Inner / Left / Right / Full Outer
Fan-out risk when right table has multiple matching rows
Still needed for custom SQL and some edge cases

Setting Up a Relationship — Step by Step

The goal here is to relate the Orders table to the Returns table in Superstore so you can analyse returned orders alongside Sales figures.

1
On the Data Source tab, drag Orders onto the canvas. It appears as a table card. This becomes your root table — the primary table all others relate to.
2
Drag Returns onto the canvas. Instead of join circles, Tableau shows a noodle line connecting the two table cards — the visual indicator of a Relationship, not a join.
3
Tableau auto-suggests a matching key — usually Order ID = Order ID. Verify this is correct. If field names differ between tables, click the dropdown on either side to select the right key manually.
4
Click Sheet 1 to go to the worksheet. Both tables' fields are now available in the Data pane, grouped under their respective table names.

The Relationship Canvas — Labelled Mockup

Data Source Canvas — Relationships Model
Root Table
📋 Orders
9,994 rows
ID
Order ID = Order ID
Related Table
📋 Returns
296 rows
No join type needed. Tableau queries each table at its own grain and combines results contextually based on the fields placed in each worksheet.

The Data Pane with Relationships Active

When tables are related, the Data pane organises fields into collapsible sections — one per table. Fields from different tables stay clearly separated even though they are all available in the same worksheet.

Data Pane — Related Tables
Orders
Abc Category
📅 Order Date
Abc Region
# Sales
# Profit
Returns
Abc Returned
Abc Order ID (Returns)

Relationship Performance Options

Clicking the noodle line opens a configuration panel. Two optional performance settings help Tableau query more efficiently:

Setting Options What It Tells Tableau
Cardinality Many-to-Many / Many-to-One / One-to-Many / One-to-One How many rows in one table can match a single row in the other — helps Tableau optimise queries
Referential Integrity Some Records Match / All Records Match Whether every row in the related table has a match in the root — lets Tableau skip unnecessary null checks

For most workbooks these can stay at their defaults. Setting them accurately matters at large data scale where query speed is important.

Adding a Third Related Table

You are not limited to two tables. Drag the People sheet (regional managers) onto the canvas and Tableau adds another noodle — this time linking on Region. Every worksheet in the workbook can now draw from all three tables: Sales from Orders, return status from Returns, and manager names from People, each aggregating correctly at its own grain.

Three-Table Relationship Model
📋 Orders (root)
📋 Returns
via Order ID
📋 People
via Region

When to Use Joins Instead of Relationships

Relationships are the right default for most multi-table workbooks. Three situations still call for a join:

You need to pre-filter or pre-aggregate one table before combining it — this requires custom SQL with an embedded join.
You are connecting to an older or less common database connector that does not support Tableau's relationship query model.
You intentionally want a flat denormalised result — for example, stamping every order row with its manager name as a fixed column.
📌 Teacher's Note

The practical test for any multi-table connection is a known-total check. For Superstore, SUM(Sales) should be approximately $2.3 million. If it is higher, a join has introduced duplicate rows — switch to a Relationship and recheck. In 90% of everyday multi-table Tableau work, Relationships give the correct number on the first try. Start with Relationships as your default. Fall back to Joins only when you have a specific, deliberate reason to do so.

Practice Questions

1. When you drag a second table onto the Data Source canvas and Tableau creates a Relationship, what visual element connects the two table cards?

2. What is the name of the row duplication problem — causing inflated aggregates — that Relationships are specifically designed to prevent?

3. Which Relationship performance setting describes how many rows in one table can match a single row in the other — for example Many-to-One?

Quiz

1. How do Relationships differ from Joins in the way Tableau combines table data?


2. After setting up a Relationship between Orders and Returns, how do fields from both tables appear in the worksheet Data pane?


3. In which situation is using a Join still the right choice over a Relationship in Tableau?


Next up — Lesson 15: Pivoting data — reshaping wide data into the tall format Tableau needs to analyse it correctly.