Data Blending is a very powerful feature in Tableau. It is used when there is related data in multiple data sources, which you want to analyze together in a single view. As an example, consider the Sales data is present in a relational database and Sales Target data in an Excel spreadsheet. Now, to compare actual sales to target sales, you can blend the data based on common dimensions to get access to the Sales Target measure. The two sources involved in data blending are referred as primary and secondary data sources. A left join is created between the primary data source and the secondary data source with all the data rows from primary and matching data rows from secondary data source.
Tableau has two inbuilt data sources named Sample-superstore and Sample coffee chain.mdb which will be used to illustrate data blending.
First load the sample coffee chain to Tableau and look at its metadata. Go to the menu - Data → New Data Source and browse for the sample coffee chain file, which is a MS Access database file. The following screenshot shows the different tables and joins available in the file.
Next, add the secondary data source named Sample-superstore by again following the steps - Data → New Data Source and choosing this data source. Both the data sources now appear on the Data window as shown in the following screenshot.
Now you can integrate the data from both the above sources based on a common dimension. Note that a small chain image appears next to the dimension named State. This indicates the common dimension between the two data sources. Drag the State field from the primary data source to the rows shelf and the field Profit Ratio from the secondary data source to the Columns shelf. Then, select the bullet chart option from Show Me to get the bullet chart shown in the following screenshot. The chart shows how the profit ratio varies for each state in both the superstore and coffee chain shops.