Data blending allows you to blend data from multiple data sources on a single worksheet. Data is joined on common dimensions so that you can create a group in one data source based off of information from another data source. This is assuming the two data connections are already established in Tableau, and that data blending is effective between them. See the following resources for assistance regarding data blending: Data Blending with Summarized Data article andAdvanced Data - Data Blending video.
To blend data in Tableau Desktop 8.0 and later, determine which field you want to blend on and click the link button to make it a linking field. This field does not have to be used in the view. Alternatively, in Tableau Desktop 7.0 and earlier, you must determine in which data source the group should be created. This data source will be the primary data source. For example, suppose you have two data sources, the primary data source contains population information by state that is attached to this article, and the secondary data source contains sales information that comes with Tableau Desktop. The objective is to create a group in the population data set based on regions from the sales data. To follow the example used in this article, download the attached population spreadsheet.
Step 1
Select Data > Connect to Data to connect to the primary data source. For this example use the attached population data source, PopulationByState.xls.
Step 2
Drag the State field to the Rows shelf. Because this is the first field in the view, the population data source is established as the primary data source for the worksheet.
Step 3
Select Data > Connect to Data to connect to the secondary data source. For this example use the attached Superstore data source, Superstore.xls.
Step 4
From the Superstore data source, drag the Region field to the Rows shelf and place it in front of the State field.
The view created shows the regions from the secondary data source and all the states associated with those regions. There are several states that are not associated with a specific region. These states are assigned to a "null" region.
The view created shows the regions from the secondary data source and all the states associated with those regions. There are several states that are not associated with a specific region. These states are assigned to a "null" region.
Step 5
Right-click on Region field and select Create Primary Group.
Step 6
For this example, drag Alaska to the West region group.
Note: A new region can be created as needed by selecting states and selecting "Group". This will create a new region including any desirable states.Selecting states and choosing "Ungroup" brings the state out of that region and back to the list of "Null" region states.
Step 7
Assign the remaining unassigned states (Hawaii, etc.) to the appropriate region.
Step 8
Once you are done customizing the regions, click OK. There is now a new group listed in the population data set called "State (group)".
Step 9
From the population data set, drag the State (group) field over the Region field in the Rows shelf to replace it.
Step 10
From the Superstore data set, drag the Sales field to the Columns shelf to see a group in the population data set based on the regions in the sales data set.
You can now close the secondary data source and then publish the workbook without the secondary data source. This is because the field you were using from that data source has been replaced by the primary group you created in the primary data source.