Getting started with the new Relationships feature in Tableau
Master Tableau's Revolutionary Data Relationship Features
This comprehensive guide covers the revolutionary Relationships feature introduced in Tableau 2020.2, representing a fundamental shift in how data visualization professionals combine and analyze data.
Core Relationship Components
Smart Aggregations
Automatically aggregate measures to the level of detail of their source table before joining. This ensures accurate calculations without manual intervention.
Contextual Joins
Handle unmatched values individually based on the current visualization context. This provides flexibility in data analysis across different scenarios.
You cannot define relationships based on calculated fields or geographic fields. Additionally, relationships can only be equal, meaning they require matching fields between tables.
Creating Relationships in Tableau
Connect to Dataset
Start by connecting to your dataset and dragging the first table to the view, just as you would in previous Tableau versions.
Add Second Table
Bring out a second table and observe the orange line that automatically appears, connecting both tables based on matching fields.
Configure Relationship
Tableau automatically detects matching fields. You can modify these fields and add more field pairs to strengthen the relationship between tables.
If you prefer traditional joins, double-click the first table, then drag the second table to create a join. Union and Blend functions remain accessible through the same method.
New vs Previous Data Model Structure
| Feature | New Relationships Model | Previous Join Model |
|---|---|---|
| Table Structure | Two-layer system (logical + physical) | Single-layer structure |
| Data Combination | Tables remain separate but related | Tables merged together |
| Join Type Selection | Automatic based on context | Manual selection required |
| Field Organization | Separated by table with dimension/measure lines | All dimensions top, measures bottom |
Interface Changes in Data Pane
Table-Specific Organization
Each table now displays with a line separating dimensions from measures, replacing the previous top-bottom organization across all tables.
Calculation Display
Calculations appear per table, with multi-table calculations displayed at the bottom of the data pane for better organization and clarity.
Record Count Changes
Number of Records for the data source has been replaced with local Count fields where COUNT of table equals SUM of Number of Records per table.
Relationships vs Traditional Joins
Relationships combine only relevant tables at analysis time, reducing processing overhead and improving performance compared to pre-joined datasets.
Implementation Readiness Checklist
Ensures automatic relationship detection works properly
Relationships only support equal conditions between matching fields
Take advantage of single relationships supporting multiple join types
Calculated fields cannot be used to define relationships
Measure time savings from reduced manual data preparation
Key Takeaways
Source: Tableau.com
Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5