How to Link Tables in Tableau

Cody Schneider9 min read

Bringing different data tables together in Tableau is how you go from looking at disconnected metrics to seeing the full story of your business. It allows you to answer critical questions by connecting, for example, your ad spend data to your sales results. This guide will walk you through exactly how to link tables in Tableau using its modern, flexible approach called "relationships," making a once-complex task surprisingly straightforward.

Why Bother Linking Tables in the First Place?

Your business data rarely lives in one perfect, all-inclusive file. More often, it's scattered across different systems and spreadsheets:

  • Your website traffic is in Google Analytics.
  • Your sales data is in your Shopify dashboard or a Salesforce report.
  • Your ad campaign performance is in Facebook Ads and Google Ads.
  • Your customer support tickets are in Zendesk.
  • Your product inventory might be in a separate SQL database or a simple Google Sheet.

On their own, each dataset provides a limited view. Reporting on ad spend alone doesn't tell you if it's profitable. Reporting on website traffic doesn't tell you which pages are converting visitors into customers.

By linking these tables on a common field (like a customer ID, email address, or campaign name), you create a unified data source. This is the foundation of powerful analysis, enabling you to build dashboards that answer questions like:

  • "What was the return on investment (ROI) for each of our marketing campaigns?" (Linking a Campaign Cost sheet to Salesforce Revenue data).
  • "Which blog posts generate the most qualified leads?" (Linking Google Analytics page data to HubSpot contact data).
  • "How does customer support activity impact repeat purchase rate?" (Linking Zendesk ticket data to Shopify order data).

Understanding the Basics: Relationships vs. Joins

If you have any experience with older BI tools or traditional database work, you’ve probably heard of "joins." Tableau still supports joins, but its newer, default method for linking tables is called Relationships. For most people, most of the time, relationships are the better choice.

Think of it like this:

What are Joins?

A join is like permanently merging two spreadsheets into one giant, wide table before you even start analyzing anything. You pick your join type (Inner, Left, Right, Full Outer), and Tableau mashes everything together based on a common key. This approach is rigid. If you have mismatched values or duplicate records, a join can often lead to incorrect aggregations or duplicate data that you need to painstakingly clean up later. It forces you to decide exactly how the tables should be structured for your entire analysis upfront.

What are Relationships?

Relationships are Tableau's smarter, more flexible way to link tables. Instead of physically merging tables into one, relationships maintain the separate nature of each table and create a logical link between them. Tableau then intelligently uses this link to pull in data from the relevant tables only when you need it for a specific chart or view.

You simply drag your tables onto the canvas and tell Tableau which fields they have in common (e.g., Customer ID in your Orders table is the same as User ID in your Customers table). The tables remain separate and are connected by a thin line Tableau calls a "noodle."

The main advantages of using relationships are:

  • Flexibility: The connections are context-aware. Tableau figures out the correct join type on a sheet-by-sheet basis, depending on the metrics and dimensions you're using.
  • Performance: It’s usually faster because Tableau isn’t trying to pre-process a massive, combined table. It queries only what’s necessary for the view you’re building.
  • Simplicity: It largely prevents the common issue of data duplication that frustrates so many people who use traditional joins.

Unless you have a very specific data preparation scenario that requires a physical merge of tables, you should always start with relationships.

Step-by-Step: How to Link Tables with Relationships

Let's walk through the process using a common business scenario: connecting customer information with their order history.

Imagine we have two tables:

  1. A Customers table (maybe from our CRM) with Customer ID, Full Name, and City.
  2. An Orders table (from our e-commerce platform) with Order ID, Customer ID, Order Date, and Sale Amount.

Our goal is to analyze sales by customer city. To do this, we need to link these two tables on their shared Customer ID field.

Step 1: Connect to Your First Data Table

First, open Tableau and connect to your primary data source. This could be an Excel file, a Google Sheet, a database, etc. For this example, let’s assume our Customers table is in a spreadsheet.

In the data source pane, Tableau will show you the available sheets or tables. Drag your first table, Customers, onto the designing canvas that says "Drag tables here."

Step 2: Add Your Second Data Table

Now, add your second data source. You can do this by clicking the "Add" button next to "Connections" in the top left. Even if your second table is in the same Excel file, you’ll just drag the Orders table onto the canvas.

Step 3: See the Magic "Noodle" Appear

When you drag the Orders table onto the canvas near the Customers table, Tableau will automatically try to create a relationship. You'll see a line - the "noodle" - appear connecting the two boxes. Tableau is smart enough to often guess the related fields correctly, especially if they have the same name, like Customer ID.

Step 4: Configure the Relationship

Tableau's guess is good, but you should always verify it. Click on the noodle to open the Edit Relationship settings.

Here you'll see:

  • The tables being related (e.g., Customers and Orders).
  • The fields that form the connection (e.g., Customer ID = Customer ID).

If Tableau guessed incorrectly, you can click on the field names to select the correct fields from the dropdown menus for each table. You can even create multi-field relationships if, for instance, a unique relationship requires matching both user_email and account_id.

Step 5: Understand the Performance Options (Optional but Good to Know)

In the Edit Relationship window, you’ll also notice settings for Cardinality and Referential Integrity. While these might sound technical, they're simply hints you can give Tableau to help it optimize performance.

  • Cardinality: Describes how records in the two tables correspond. Are there many orders for one customer (One-to-Many)? Or one support ticket for one customer (One-to-One)? Setting this can help Tableau write more efficient queries.
  • Referential Integrity: This tells Tableau if every row in one table has a matching row in the other. If "some" records match, Tableau will be more careful with its queries. If you know that "all" records match, it can speed things up.

The default settings work fine most of the time, so don't worry about mastering these when you're just starting. The key is ensuring your relationship fields are correctly matched.

That's it! Your tables are now linked. You can go to a new worksheet and start building your view. You'll see the fields from both the Customers and Orders tables available in the data pane on the left, ready to be used together. You can now drag City from the Customers table to Rows and Sale Amount from the Orders table to Columns to easily create your analysis.

Troubleshooting Common Linking Issues

You’ll occasionally run into a few snags. Here are the most common ones and how to fix them.

Mismatched Data Types

The problem: You're trying to link Customer_ID from one table, where it's a number (e.g., 12345), with ClientID from another table, where it's text (e.g., "C-12345"). Tableau requires the data types to match.

The fix: In the Data Source view, you can change the data type of a column by clicking on the icon next to its name (# for numbers, Abc for text). Change one to match the other so the relationship can be established.

Incorrectly Blended Data

The problem: Your chart has lots of null (blank) values where you expect to see data, or the numbers seem off. For example, you see sales but no corresponding customer city.

The fix: This often means there are records in one table with no matching counterpart in the other (e.g., an order record where the Customer ID doesn't exist in the Customers table). This is often an issue with the underlying data's integrity. Double-check your Edit Relationship settings to ensure you are linking the correct fields. If the relationship is correct, you may need to clean your source data.

Creating Calculated Fields for Your Relationship

The problem: The fields you need to link don't quite match. For instance, one table has a name field as "John Smith" and the other uses fname ("John") and lname ("Smith").

The fix: In the Edit Relationship dialog, you don’t have to use an existing field. You can click "Create Relationship Calculation" at the bottom of the field list. This allows you to create a calculated field just for this relationship. In our example, you could create a calculation in the second table: [fname] + " " + [lname]. Now you can link this calculated field to the name field in the first table.

Final Thoughts

Learning how to link tables is the single most important step in elevating your Tableau skills from basic charting to developing true business intelligence. Using relationships simplifies this process, allowing you to fluidly connect various data sources and uncover insights that live at the intersection of your different business functions.

Bringing all your data together is the necessary first hurdle for any meaningful analysis. The process of connecting data sources, configuring relationships, and building reports still requires some hands-on work. If your goal is to get straight to insights without the setup, we've designed Graphed for that exact purpose. We help you connect all your marketing and sales data sources in just a few clicks, then let you create entire dashboards and ask data questions using plain English, skipping the manual build process entirely.

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.