Javatpoint Logo
Javatpoint Logo

Data Blending in Tableau

Data Blending is a powerful feature of Tableau. It is used to analyze the data in a single view from a related data in multiple data source.

For example: Suppose a Sales data is present in a relational database and Sales Target data in an Excel sheet.

Now, for comparing the actual sales with the target sales, you have blended the data based on common dimensions to get access into the Sales Target measure.

The two data sources are involved in data blending are referred as the primary data source and the secondary data source.

A left join is built between the primary and the secondary data source with all the data rows from primary and only matching data rows from the secondary data source.

How to do data blending

Tableau has two inbuilt data sources that are Sample coffee chain.mdb and Sample-superstore, which can be used to illustrate data blending.

  • First, load the sample coffee chain into Tableau and visualize its metadata.
Data Blending in Tableau
  • Go to the data source below connect → click on MS Access database file and browse for the sample coffee chain file.

The below screenshot shows the different tables and joins available in the file:

Data Blending in Tableau

How to Add Secondary Data Source

Add the secondary data source which name is Sample-superstore.xls with the following steps:

  • Click on Add button of the data source.
  • Add a new connection to use cross-database joins to a file and choose the data source such as Microsoft Excel.
  • Now, both the data sources appear on the Data window, as shown in the below screenshot.
Data Blending in Tableau

Blending the Data

You can integrate the data from sample-superstore and sample coffee chain sources based on a common dimension.

  • A small chain image appears in the dimension field that is State. It indicates the common dimension between the sample coffee chain and sample-superstore data sources.
  • Drag the field State from the primary data source into the rows shelf and also drag the field Profit from the secondary data source into the Columns shelf.
  • Then, select the horizontal bar option from Show Me to get the graphical visualization.
  • The chart shows how the profit varies for each State in both the sample coffee chain and sample-superstore data sources. Shown in the below screenshot:
Data Blending in Tableau




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA