How to Connect Two Data Sources in Tableau
Bringing multiple data sources together is fundamental to painting a complete picture of your business performance. While an amazing tool for visualization, Tableau can feel a little intimidating when you need to combine data from different files or databases. This tutorial will walk you through the essential methods for connecting two data sources in Tableau, focusing on the modern ‘Relationships’ approach and the classic ‘Joins’ method.
Data Relationships vs. Joins: What's the Difference?
Before connecting anything, it's important to understand the two primary ways Tableau combines data: relationships and joins. Tableau introduced relationships as the new default method a few years ago because it’s typically more flexible and efficient, but joins are still a powerful and necessary tool in many situations.
Tableau Relationships: The Smart and Flexible Method
Think of relationships as a smart contract between your tables. Instead of mashing all your data together into one big table right at the start, you simply tell Tableau how your tables are related to each other. For example, you might tell it, "This 'Orders' table is related to the 'Customers' table through the 'Customer ID' field."
When you build a visualization, Tableau looks at the fields you're using and intelligently brings in only the data it needs from each table, based on the relationship you defined. This smart approach, often called "semantic joins," offers several advantages:
- Better Performance: It avoids creating massive, upfront tables, which can slow down performance, especially with large datasets.
- Maintains Detail: Relationships preserve the native level of detail for each table. You won't accidentally duplicate data (like calculating total sales and accidentally multiplying it by the number of times a customer appears).
- More Intuitive: Setting them up is more aligned with how you think about your data sources and how they connect conceptual
In most cases, using relationships is the recommended approach and should be your first choice.
Tableau Joins: The Classic and Specific Method
Joins are a more traditional database concept. When you create a join, you are explicitly merging tables together to create a single, new, fixed table of data before you start building any visualizations. All your fields from the joined tables will live together in one place in the data source pane.
Joins give you precise control but require you to be more deliberate about your data structure from the outset. There are four main types of joins you’ll encounter:
- Inner Join: This is the most common and restrictive type. It returns only the rows that have matching values in both tables. Think of it as the overlapping section of a Venn diagram. If a customer exists in your Customer table but has never placed an order, they won't appear in an inner join with the Orders table.
- Left Join: This returns all the rows from the first (left) table and only the matching rows from the second (right) table. If there’s no match in the right table, you'll see null values. This is great when you want to see all your customers, including those who haven't made a purchase yet.
- Right Join: This is the opposite of a left join. It returns all rows from the second (right) table and only the matching rows from the first (left) table.
- Full Outer Join: This returns all rows from both tables. If a row from one table doesn’t have a match in the other, Tableau will still include it and fill the missing fields with null values. It shows you everything from both sides, whether there's a match or not.
Connecting Data Sources Using Relationships (Recommended)
Let’s walk through the modern, recommended way to connect two data sources. For this example, imagine we have two Excel files: one named Store_Sales.xlsx containing sales transactions, and another named Customer_Details.xlsx containing customer profile information.
Step 1: Connect to Your First Data Source
After opening a new Tableau workbook, you’ll land on the "Connect" page. In the "To a File" section, click on Microsoft Excel. Find and select your first file, Store_Sales.xlsx. Once connected, you will see the sheets from that file listed on the left. Drag the main sheet (e.g., 'Orders') onto the canvas that says "Drag tables here." This establishes it as your primary table.
Step 2: Add Your Second Data Source
Right underneath the "Connections" header in the top left, where you see your first file name, click the Add button. Clicking this allows you to establish a new connection within the same data source. Again, select Microsoft Excel and choose your second file, Customer_Details.xlsx.
You’ll now see the tables from both Excel files in the left-hand pane.
Step 3: Create the Relationship
From the left pane, find the sheet you want to connect from the Customer_Details workbook (e.g., 'Customers'). Simply drag this sheet onto the canvas near your first table. You’ll see Tableau automatically draw a line between the two tables. This orange line is affectionately known as "the noodle," and it represents the relationship you've just created.
Step 4: Configure the Relationship Details
Tableau is pretty smart and will often correctly guess the field that connects the two tables (like 'Customer ID'). To check or modify this, click on the noodle itself. A dialog box will appear.
- Fields: This section shows which fields from each table are being used to establish the link. If Tableau got it wrong, you can click on the field names and select the correct ones from the dropdown menus.
- Performance Options: Here, you can define cardinality ("Many-to-many," "One-to-many," etc.) to tell Tableau more about how your data relates. This helps optimize query performance. For our example, one customer can have many orders, so we'd define the relationship on 'Customer ID' accordingly.
That’s it! Click out of the dialog box, then click on "Sheet 1" at the bottom of the screen. In the worksheet view, you’ll see fields organized under each separate table. You can now drag and drop fields from both tables into your view, and Tableau will handle the combinations in the background.
Connecting Data Using Joins
What if you have a specific case where you absolutely need to merge your tables into a single, flat structure before analysis? This is where joins come in. The process starts similarly but requires one extra step to get to the "join canvas."
Step 1: Open the Join Canvas (The Physical Layer)
After placing your first table (e.g., 'Orders' from Store_Sales.xlsx) on the canvas, you do not add another table here. That would create a relationship. Instead, double-click on the box representing your 'Orders' table. This action opens up what Tableau calls the "physical layer" - this is the canvas where you create joins.
Step 2: Drag in Your Second Table to Create a Join
Now, follow the same process as before to add your Customer_Details.xlsx file using the Add connection button. Once its tables appear on the left, drag the 'Customers' table and drop it directly to the right of your 'Orders' table in the join canvas. As soon as you drop it, a Venn diagram icon will appear between them, signifying that you have created a join, not a relationship.
Step 3: Configure the Join Type and Clauses
Click on the Venn diagram icon. This opens the join configuration pane.
- Select the Join Type: On the left side of the popup, you can choose between Inner, Left, Right, and Full Outer. Select the one that matches your analytical need. For example, if you want to see all sales transactions even if the customer information is missing, you'd choose a Left Join with 'Orders' as the left table.
- Select the Join Clauses: On the right side, you define the join clause, which is the common field that links the two tables. Tableau will guess, but you can correct it here. Ensure 'Customer ID' from the 'Orders' table is mapped to 'Customer ID' from the 'Customers' table.
Once you close the configuration, you can look at the data preview below. It will show a single, wide table that is the result of your join. When you go to a worksheet, all fields will be listed together in the data pane, not separated by table.
Final Thoughts
Connecting data from different sources is a crucial skill for unlocking richer insights in Tableau. By understanding the core differences between flexible relationships and specific joins, you can choose the right method for your analysis and start combining information from across your business, from sales data to customer profiles.
While mastering Tableau configurations is a powerful skillset, we know that getting insights shouldn't always require a technical setup process. We built Graphed to bypass the complexity of manually configuring connections. You can link your critical apps like Google Analytics, Shopify, and Salesforce with just a few clicks, and then create complete dashboards by simply asking for what you want in plain English - no wrestling with noodles or choosing between join types required.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?