Relationships
Relationships are a dynamic, flexible way to combine data from multiple tables for analysis.
Are displayed as flexible noodles between logical tables.
They describe how independent tables are related to each other, but the tables are not merged. This means no data is lost and it maintains the level of detail on each table.
Tableau, if it can, will automatically select a matching field to match them together, but you may have to select them yourself. It does not require you to select join types.
Creating a relationships will make all row and column data from related tables available in the data source.
Tableau, if it can, will automatically select a matching field to match them together, but you may have to select them yourself. It does not require you to select join types. Tableau will create the appropriate joins automatically based on the fields in use during analysis.
Limitations of Relationships: You cannot select a join type.
Joins
Joins are a more static way to combine data.
In Tableau Desktop, you need to define joins in the ‘Physical Layer’, rather than the ‘Logical Layer’ where relationships are created. These must be done before analysis.
Additionally, these cannot be changed without impacting all sheets that utilize the whole data source.
The joins are represented by a Venn Diagram, and you need to select a join type and join condition, which is why we may use these over a relationship.
Creating joins merges all tables into a single table, so join types are important to consider. Otherwise, you risk removing data you may need or ‘exploding’ the table.
Joins dropping unmatched data is one of their main limitations.
For example, below the inner join has ‘Book Title’ as the join clause. An inner join will drop any book that hasn’t been sold (doesn’t appear in the Sales table) or any book that has been sold, but we don’t have any information on the book edition (doesn’t appear in Edition table). The inner join will only keep books that appear in both.
If you wanted to include either sides of these rejected book records, you will need to swap to a left, right or outer join, but you will then have nulls in your data.