Data Blending in Tableau - Know How-To with Examples

This tutorial will help you master the process of data blending in Tableau guided by hands-on examples that demonstrate how to merge disparate datasets.

Data blending in Tableau allows analysts to combine data from different datasets, regardless of whether they reside in the same or even in different databases. This capability is invaluable in scenarios where a single dataset lacks comprehensive information or multiple datasets must be analyzed for deeper insights. Check out this Tableau data blending tutorial to understand the concept of data blending in Tableau, exploring its concepts, methodologies, and practical applications through illustrative examples.

What is Data Blending in Tableau? 

Data blending in Tableau is the most helpful method for merging data from different sources. It displays secondary data sources with primary data sources in a single view. Data blending is used when related data is present in multiple data sources; most of them are to be analyzed together directly in a single view.

 

Data blending in Tableau typically occurs when there is a common field, known as a "blend field," shared between the primary data source (the main dataset) and the secondary data source (the additional dataset). Tableau then uses this common field to match and blend the data dynamically when creating visualizations or calculations.

When to Use Data Blending in Tableau? 

Knowing when to use data blending instead of joins is essential for efficient data visualization and analysis in Tableau.

 

Here are some scenarios where data blending is preferable in Tableau:

 

Scenario 1 - Data blending can be more suitable when your data sources have different levels of granularity. For example, if one data source provides sales data aggregated by country while another provides sales quota data broken down by individual sales agents and their assigned countries, data blending allows you to aggregate the quota data by country and blend it with the sales data seamlessly.

 

Scenario 2—Data blending excels in scenarios where you must perform post-aggregate joins. In Tableau, this means joining data sources after aggregating individual sources. This approach minimizes the number of records joined together and improves computational efficiency. For instance, when comparing sales figures to sales quotas by country, data blending enables you to aggregate sales data first and then blend in the aggregated sales quota data.

 

Scenario 3 - Data blending simplifies the analysis process by automating the integration of multiple data sources. Instead of manually performing complex joins and aggregations, Tableau automatically identifies standard fields between data sources and blends them seamlessly. This simplification streamlines the workflow and allows analysts to focus more on deriving insights from the data.

How to do Data Blending in Tableau - A 5-Step Process 

Here's a step-by-step guide on how to do data blending:

 

Step 1: Connect to at least two data sources in Tableau. You can do this by navigating the Data menu and selecting "New Data Source" to add additional sources.

 

Step 2: After connecting to the data sources, drag a field from one of them onto the Tableau canvas. This field will serve as the primary data source.

 

Step 3: Switch to the second data source and choose a field from this source to include in the same view. This field will become the secondary data source. Tableau will automatically recognize the relationship between the primary and secondary data sources.

 

Step 4: Look for a linking icon () in the Data pane, which indicates that the fields from the two data sources are being used to blend the data. If the linking icon is missing or appears broken, you may need to establish the blend relationship manually.

 

Step 4: If the linking icon is missing or broken, click on the broken link icon () next to the desired field in the secondary data source. This action will establish an active link between the two data sources.

 

Data Blending in Tableau

Source: Tableau Documentation

 

Step 5: With the blend relationship established, you can now freely drag fields from the secondary data source onto the visualization canvas. Tableau will blend the data from both sources based on the common field. Tableau will blend the data accordingly once the secondary data source fields are added to the view. Using the combined data, you can now create visualizations, dashboards, or any other analysis. 

Data Blending in Tableau With an Example

We have two datasets related to the 2018 FIFA World Cup: "world_cup_2018_squads.xlsx" and "world_cup_results.xlsx." The first dataset likely contains information about the squads participating in the tournament, including details such as countries and the number of caps (international appearances) for each player. The second dataset probably includes match results from the World Cup, such as countries and the number of goals scored by each team.

 

Now, we want to analyze and visualize data from both datasets simultaneously in Tableau. This is where data blending comes into play. Data blending allows us to combine and analyze data from different sources without merging the datasets at the data source level. Let's walk through the video below to understand it better - 

Here's a brief recap of the steps outlined in the video - 

 

  1. Connect the primary data set, "world_cup_2018_squads.xlsx," and the secondary data set, "world_cup_results.xlsx," to your Tableau workbook.

 

  1. Drag the "Country" dimension from the primary data source and drop it onto the row shelf.

 

  1. Drag the "Caps" measure from the primary data source and drop it onto the column shelf.

 

  1. Drag the "Goals Scored" measure from the secondary data source and drop it onto the column shelf. This is where data blending occurs, as you're combining measures from two different data sources.

 

  1. Your visualization is now ready, showing the number of caps alongside the goals scored for each country in the 2018 World Cup.

Data Blending Limitations in Tableau 

Data blending offers significant analytical capabilities, but it comes with several limitations that users should consider. Non-additive aggregates such as COUNTD, MEDIAN, and RAWSQLAGG may not behave as expected when used in blended data sources, potentially leading to inaccuracies. Additionally, blended data sources cannot be published as a unit, requiring users to publish each source separately and then blend them, adding complexity to data management processes. Furthermore, data from secondary sources must always be aggregated before blending; if blending cube data, it must be the primary data source.

Tableau Data Blending vs Joins 

Table joins are preferred for their performance, especially in scenarios with a 1:1 relationship between tables, and they excel in cross-database joins. However, they may lead to duplicated data and performance issues in 1:many or many: many relationships. Data blending, on the other hand, can be advantageous when dealing with large amounts of data, as it aggregates data first. It offers flexibility for ad-hoc analysis by allowing quick changes in linking properties like aliases. Nonetheless, data blending is limited to LEFT joins and has design constraints and limitations compared to traditional joins. 

Become a Tableau Expert with ProjectPro! 

Tableau's versatile capabilities empower users to drive impactful outcomes across various industries, from optimizing business operations to identifying market trends and enhancing decision-making processes. Embracing real-world use cases ensures learners acquire technical expertise and develop critical thinking and problem-solving skills in an enterprise-grade setting. Working on such projects helps you to apply these techniques and bridge the gap between theory and practice. ProjectPro is all that you need to master your data science skills. With ProjectPro's guided video walk-throughs and step-by-step approach to real-world projects, learners can enhance their Tableau skills and better understand how to tackle complex data challenges efficiently. So, check out ProjectPro today to master the art of data visualization and analysis. 

 

What Users are saying..

profile image

Ray han

Tech Leader | Stanford / Yale University
linkedin profile url

I think that they are fantastic. I attended Yale and Stanford and have worked at Honeywell,Oracle, and Arthur Andersen(Accenture) in the US. I have taken Big Data and Hadoop,NoSQL, Spark, Hadoop... Read More

Relevant Projects

Build Deep Autoencoders Model for Anomaly Detection in Python
In this deep learning project , you will build and deploy a deep autoencoders model using Flask.

Learn to Build a Polynomial Regression Model from Scratch
In this Machine Learning Regression project, you will learn to build a polynomial regression model to predict points scored by the sports team.

Deep Learning Project- Real-Time Fruit Detection using YOLOv4
In this deep learning project, you will learn to build an accurate, fast, and reliable real-time fruit detection system using the YOLOv4 object detection model for robotic harvesting platforms.

Build a Credit Default Risk Prediction Model with LightGBM
In this Machine Learning Project, you will build a classification model for default prediction with LightGBM.

Create Your First Chatbot with RASA NLU Model and Python
Learn the basic aspects of chatbot development and open source conversational AI RASA to create a simple AI powered chatbot on your own.

Demand prediction of driver availability using multistep time series analysis
In this supervised learning machine learning project, you will predict the availability of a driver in a specific area by using multi step time series analysis.

BERT Text Classification using DistilBERT and ALBERT Models
This Project Explains how to perform Text Classification using ALBERT and DistilBERT

Multi-Class Text Classification with Deep Learning using BERT
In this deep learning project, you will implement one of the most popular state of the art Transformer models, BERT for Multi-Class Text Classification

Recommender System Machine Learning Project for Beginners-2
Recommender System Machine Learning Project for Beginners Part 2- Learn how to build a recommender system for market basket analysis using association rule mining.

Deep Learning Project for Text Detection in Images using Python
CV2 Text Detection Code for Images using Python -Build a CRNN deep learning model to predict the single-line text in a given image.