Tableau Course
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
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.
The Relationship Canvas — Labelled Mockup
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.
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.
via Order ID
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:
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.