How to Blend 2 Data Sources in Tableau
Trying to prove your marketing ROI feels impossible when your ad spend data is in one platform and your sales data is in another. Combining siloed information is a universal headache, but it’s a problem Tableau’s data blending feature is built to solve. This article will walk you through exactly how to blend two different data sources in Tableau to create a single, unified view of your performance.
What is Data Blending in Tableau?
Data blending is Tableau's way of letting you pull in data from different sources and display it in a single visualization. Think of it as a smart, on-the-fly version of VLOOKUP in Excel, but instead of just working on one sheet, it works across completely separate datasets — like a Google Analytics export and your Salesforce report.
You might have website traffic data from Google Analytics and sales lead information from Mailchimp. Both datasets share a common element: the date. Data blending allows you to link these two sources using that common field, so you can build a chart that shows how website sessions and new subscribers trend together over time.
Data Blending vs. Joining: What's the Difference?
If you're familiar with data concepts, you might be thinking, "Isn't that just a join?" Not quite. They're similar but serve different purposes:
- Joins combine data at a granular, row-by-row level and are typically done when your data lives in the same source (for example, joining two different tables within the same SQL database). A join creates a brand new, flat table of data before your analysis begins.
- Blending works with aggregated data from two different sources. Tableau queries each data source independently, aggregates the results, and then blends the aggregated results together in your active worksheet. It's a post-aggregate combination.
For most marketers and business owners combining data from different apps (like Shopify and Facebook Ads), blending is the correct and most straightforward approach.
Understanding Primary and Secondary Data Sources
Before you blend, you need to understand the concept of a "primary" and "secondary" data source. This is the single most important rule in data blending.
The first data source you use in a worksheet (i.e., the first field you drag onto the pane) becomes the primary data source for that sheet. All other data sources used on that sheet become secondary data sources.
Why does this matter? The primary source determines the level of detail seen in your visualization. For example, if your primary source contains weekly data, your final visualization will only show data on a weekly level, even if your secondary source has daily data. The secondary data can only provide information for the corresponding "rows" that exist in the primary source.
In your Tableau interface, this is easy to spot:
- The primary data source will have a small blue checkmark next to its name.
- The secondary data source(s) will have an orange checkmark.
Keep this in mind: Always start building your viz with the data source that contains the most complete or important dimension you want to analyze (e.g., a complete list of dates, campaign names, or customer IDs).
Step-by-Step Guide to Blending Two Data Sources
Let's walk through a classic marketing scenario: You want to combine traffic data from Google Analytics 4 with sales pipeline data from Salesforce to see which days generated valuable leads. The common field here will be the Date.
Step 1: Connect to Your Data Sources
First, you need to add both of your data sources to your Tableau workbook.
- In Tableau, go to the Data Source tab at the bottom-left of the screen.
- Click Add to add your first data source, 'Google Analytics.' Authenticate your account and select the correct property. Your GA4 data will now appear.
- Click Add again. This time, connect to 'Salesforce.' Enter your login credentials to connect your CRM account and bring in the specific object or report you need (e.g., the 'Lead' object).
Now, if you go to a new worksheet, you'll see both of your data sources listed in the 'Data' pane at the top-left.
Step 2: Define the Relationship (The "Linking Field")
With both sources connected, it's time to tell Tableau how they relate to each other. This is done through a common dimension, called the linking field.
You can do this in two ways:
- Automatic Linking: If your common field has the exact same name in both data sources (e.g., 'Date' in GA4 and 'Date' in Salesforce), Tableau will often identify this automatically. You'll see a little gray 'link' icon next to that field.
- Manual Linking: If the names are different (e.g., 'Date' in GA4 vs. 'Created Date' in Salesforce), you'll need to create the link yourself. In the 'Data' pane, go to your secondary data source, find the small gray link icon next to the dimension that should be a linking field, and click it so it turns orange. An orange link icon means you've activated that field as a handmade relationship link in the blend.
Step 3: Build Your Visualization
This is where the magic happens and where the primary/secondary source concept comes into play.
- Select your primary source. Since we want to display performance over time, our GA4 source (with a complete list of dates) is the best choice. Click on the GA4 data source in the Data pane. It doesn't have a checkmark yet.
- Drag your first "pill." Take the 'Date' dimension from your GA4 data and drag it onto the 'Columns' shelf. Notice that a blue checkmark now appears next to the GA4 source. You've officially designated it as the primary source for this worksheet.
- Drag a measure from the primary source. From your GA4 data, drag the 'Sessions' measure onto the 'Rows' shelf. You should now see a line chart of website sessions over time.
- Add data from the secondary source. Now, click on your Salesforce data source in the 'Data' pane. You'll see it has an orange checkmark next to it. Find a measure you want to track, like the 'Record Count' for leads, and drag it onto the 'Rows' shelf next to 'Sessions.'
Success! You should now have one chart with two lines: one showing website sessions from Google Analytics and another showing the number of leads created from Salesforce for the same corresponding dates.
3 Common Pitfalls to Avoid
Blending data can feel tricky at first. Here are some common roadblocks and how to navigate them.
1. Dealing with the Dreaded Asterisk (*)
Sometimes when you bring in a field from a secondary source, you might see an asterisk (*) in your view instead of a number. This happens when there are multiple matching values in the secondary source for a single value in the primary source. For example, if you're linking on 'Date' and your Salesforce data has multiple leads created on the same day, Tableau doesn't know which individual lead to show, so it displays an asterisk.
The Fix: This is expected behavior! Blending works at an aggregate level, so you should be pulling in aggregated measures (like SUM(Profit), COUNTD(Leads)) from your secondary source, not distinct dimensions that could cause this mismatch.
2. Picking the Wrong Primary Source
Let's say your Salesforce data only has leads for 10 days out of the month, but your GA4 data has traffic for all 30 days. If you make Salesforce your primary source, your final chart will only show data for those 10 days, completely missing the other 20 days of traffic.
The Fix: Always start your visualization with the dimension that provides the most complete framework for what you're trying to view — usually a comprehensive list of dates, campaign names, or customer types.
3. Forgetting to Check Your Data Granularity
If you're trying to blend data from Facebook Ads and Shopify on 'Campaign Name,' but your naming conventions are slightly different ("Summer Sale 2024" in one versus "summersale_2024" in another), the blend won't work correctly. Tableau only sees them as two distinct campaigns.
The Fix: Before blending, make sure your linking fields are clean and consistent across both sources. You may need to create a calculated field or clean up your source data to ensure the formatting matches perfectly.
Final Thoughts
Blending data sources in Tableau is an essential skill for getting a complete picture of your business performance. By connecting disparate platforms like your analytics tools and CRM, you can move beyond single-channel reporting and start answering the big-picture questions about what activities are truly driving growth.
While mastering tools like Tableau is valuable, it often involves a steep learning curve and hours spent on manual reporting. We built Graphed because we believe getting insights shouldn't require so much tedious work. Instead of manually blending sources, you can connect your platforms once, then simply ask things like, "Show me a dashboard of my Facebook Ads spend vs. my Shopify revenue by campaign." Graphed builds the charts and dashboards for you in real time, turning hours of data wrangling into a 30-second task.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.