You are currently viewing Introduction to Data blending in Tableau

Introduction to Data blending in Tableau

Loading

Data blending in Tableau is a powerful feature used to combine data from different sources that do not have a direct relationship but share a common field, allowing you to analyze data from multiple datasets in a single visualization. When working with different data sources (e.g., SQL, Excel, cloud databases), data blending helps to seamlessly combine these different sources.

Tableau distinguishes between the primary data source and secondary data sources during blending. The primary source drives the visualization, and fields from the secondary data sources are blended based on a common field (known as the blending key).

Benefits of using Data Blending in Tableau

  • Blending multiple data sources: When your data comes from different sources (e.g., sales data from SQL Server and marketing data from an Excel file), blending enables them to be combined without extensive ETL (extract, transform, load) processing.
  • Handling data at different levels: When datasets have different levels of detail (e.g., daily sales data and quarterly goals), blending data can combine these sources while maintaining integrity.
  • Enhancing existing data with additional context: For example, adding demographic information from a different source to enhance sales data.
  • Simplifying complex joins: For cases where creating complex joins is not possible due to limitations in the data structure.

Key concept in Data Blending in Tableau

  • Primary data source: The main dataset you’re working with in Tableau.
  • Secondary data source: The additional dataset that is blended with the primary data.
  • Linking fields: Common fields between two datasets that Tableau uses to blend data (for example, region, date, or product).
  • Aggregation: Data from the secondary source is always aggregated based on the granularity of the primary data source.
  • Blending icons:
    • A blue link icon indicates an active blend between datasets.
    • A grey link icon indicates an inactive blend.

Dataset description

The dataset includes product sales details of India and USA. The dataset is given on Github.

Steps to use Data Blending in Tableau

Step 1: Open Tableau

Step 2: Click on one of any data source like Text file

Step 3: Browse/Select file and click on Open

Step 4: Click on Data tab and select New Data Source or Ctrl+D to import another data

Step 5: Select a file source like Text file

Step 6: Browse/Select file and click on Open

Step 7: Click on Sheet 1 to perform visualized actions on data

Step 9: Click on Data tab and select Edit Blend Relationships…

Step 10: select Primary data source and choose Automatic or Custom according to your circumstances

Note:

  • Custom – It is for selecting/making relationship between two tables using columns.
  • Automatic – It will select columns automatically from provided data according to same named columns

Step 11: After selecting, remove Product column from list

Step 12: After removing extra/non-usable column, click on OK

Step 13: Select sales india table; drag-n-drop Season to Rows and Revenue to Columns

Step 14: Select sales usa table; drag-n-drop Revenue to Columns

Note:

  • Here, we can see that the data has been blended with different files based on the Season to show two graphs.

Conclusion

If you follow the procedures that have been outlined above, you will be able to unleash the ability of data blending in Tableau, which will allow you to construct visuals that are rich in insight and aggregate data from numerous sources. For the purpose of avoiding issues such as null values or aggregation mismatches, it is imperative that you always make certain that blending is managed adequately and that fields are linked correctly.

If you like the article and would like to support me, make sure to:

Leave a Reply