Query semantics based on relationships
Query semantics based on relationships
for analysis. Relationships can be many-to-many and support full outer joins.
You don't need to use LOD expressions such as FIXED to deduplicate data in
related tables.
Think of a relationship as a contract between two tables. When you are building a
viz with fields from these tables, Tableau brings in data from these tables using
that contract to build a query with the appropriate joins.
● No up-front join type. You only need to select matching fields to define a
relationship (no join types). Because you don't specify the join type, you
won't see a Venn diagram when you’re setting up relationships.
● Automatic and context-aware. Relationships defer joins to the time and
context of analysis. Tableau automatically selects join types based on the
fields being used in the visualization. During analysis, Tableau adjusts join
types intelligently and preserves the native level of detail in your data. You
can see aggregations at the level of detail of the fields in your viz rather
than having to think about the underlying joins.
● Flexible. When you combine tables using relationships, it’s like creating a
custom, flexible data source for every viz, all in a single data source for the
workbook. Because Tableau queries only tables that are needed based on
fields and filters in a viz, you can build a data source that can be used for a
variety of analytic flows.
Note: To go to the original join canvas, double-click a logical table in the top level
view (the logical layer of the data source). You can still add joins and unions
between tables in the physical layer of the data source. For more information, see
The Tableau Data Model.
When you open a pre-2020.2 workbook or data source in Tableau version 2020.2
and later, your data source will appear as a single logical table in the canvas. You
can continue to use the workbook as you did before.
If your data source contained multiple joined or unioned tables, the single logical
table is displayed with the name "Migrated Data". You can rename the Migrated
Data table.
To see the physical tables that make up the single logical table, double-click that
logical table to open it in the physical layer. You’ll see its underlying physical
tables, including joins and unions.