KNOWLEDGE BASE

Deciding Between Joining Tables and Blending Data


Published: 12 Apr 2017
Last modified date: 20 Jul 2023

Question

How to determine whether to join tables or use data blending.

Environment

Tableau Desktop

Answer

Assess your data and consider the following:
  • Where your data is coming from
  • How many connections you have in your workbook
  • The number of records you have in the data

General guidelines for when to join tables and when to use data blending

  • If a workbook uses data from more than one data source, you can use data blending or perhaps invest in a federated database system. For more information, refer the Federated Database Systems page on the Wikipedia website.
  • If a workbook uses two data connections from the same data source, joining the data tables can improve performance and filtering control.
  • If you are adding data to an existing data source or a table in the same data connection, using a join is better.
  •  
However, within these guidelines, sometimes joining data tables may not work as well as blending data. Common situations that may perform better with data blending include the following:
  • The data source contains too many records for a join to be practical.
  • You want to display a summary and details at the same time.

Note: If one of the data sources that you want to use for data blending is a cube, the cube must be the primary data source.

Extended guidelines, links to examples and additional information

Adding data to an existing data source

If you want to add details such as returns of ordered merchandise, you can include this information without modifying the original data. For example, you can join a table that identifies returned orders to the original data source. For more information, see Joining Tables in the Tableau Desktop Help. For an example, see the Joining Excel Worksheets article.

Using two data connections to the same data source

If you have more than one table from the same data source, you may find it faster to create the join in Tableau than in the source. If the join does not provide the expected results, see the other options described in this article.

Using a data source with too many records for a query

If you have multiple data connections that are large and take a long time to query, using a join can increase query time dramatically. A better approach is to aggregate the tables, then blend the data on the aggregate. For example, you can aggregate data on the year rather than the date, or on the product type instead of the product name. For an example, see the Data Blending with Summarised Data article.

Using multiple data types for one worksheet

Tableau assumes that fields with same name and data type match so automatically creates a data relationship between them. Use the Relationships dialogue box to connect the two data sources.

Note: You can manually create custom relationships between fields that have different names. For more information, see Defining Relationships in the Tableau Desktop Help. 

Showing summary and details together

If you want to see both the summary of a calculation and the breakdown on same view, select the data source from the Data menu and then select Duplicate. This will get you started to blending the data to communicate between two data connections. 

Did this article resolve the issue?