Data Blending In Tableau
The data blending features in Tableau enable us to combine data from two different data sources into a single view or worksheet.
Unlike a join, blending only combines relevant data from different data sources, whereas a join works at the row level and often duplicates data that is repeated across multiple rows.
A data blend is composed of two data sources, a primary data source and a secondary data source. Additional relevant data from the secondary data source is merged with the main data from the primary data source in order to display a more complete picture.
Charts and graphs can be created using both data sources at the same time.
How to Blend Data in Tableau?
We will illustrate data blending in Tableau with the help of an example. Currently, we are working with two data sets: H&M store 2018 sales and H&M store 2019 sales. While the number of fields is the same, the data is different between these two data sets.
The table “H&M 2018” contains all the data for the regions in the field named Region. In the “H&M 2019” table, the field that contains the same five regions is called Zone. We can equate these two fields with the help of data blending as they both contain similar regions such as north, south, central, east, and west.
Hence, data blending makes data analysis more meaningful and insightful by establishing relationships between two relevant data sources. Blending two data sets in a single Tableau worksheet allows us to compare them more efficiently.
First, let’s look at two sets of H&M sales data before learning about blending data.

Separate connections are made to “H&M Sales 2018” and “H&M Sales 2019”.
By selecting the Edit Relationship option on the Data tab, we can see the existing relationship between these two data sets and create new ones.
A dialog box will open to show the primary and secondary data sources, as well as a list of any existing or automatically detected relationships between the two tables.
The primary and secondary data sources can be changed from the drop-down list according to your preferences. In addition, we can change the Automatic option to Custom in order to create a new relationship.
We will now establish a relationship between the fields Region and Zone from the two tables to indicate that the constituent data in the two tables is similar (not identical). We select the Custom option and click on the Add button.
Following this, you will be presented with a list of fields from both tables. Here, we select the Zone and Region. Click on the OK button.
By doing so, a new relationship is created between Zone and Region fields. To confirm, click OK. Note that this relationship applies only to the current worksheet and not to other worksheets in the Tableau workbook.
The two data sources on our worksheet are indicated by blue and orange tick marks, indicating primary (blue) and secondary (orange).
We can now start analyzing the data from these two data sets. There will be a link icon next to the fields that are linked between the two tables. Due to their linkage, these fields from the primary data set can be used as common fields.
The screenshot below shows a bar graph of total sales in H&M stores in 2018 and 2019 (in USA). The data blending enabled us to get state-by-state and region-by-region sales data for both years in one graph. To provide region information, we were able to use the Zone field from the 2019 sales dataset as a common field between the two tables.