How to Inner Join in Tableau

Cody Schneider9 min read

Performing an inner join in Tableau is one of the most fundamental ways to combine datasets. It allows you to merge tables based on a shared value, creating a unified view for deeper analysis. This article breaks down exactly what an inner join is, when to use it, and provides a step-by-step guide to creating one in Tableau.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

What Exactly Is an Inner Join?

In data analysis, your information is often split across multiple tables. For instance, you might have one table with customer details and another with their order history. To see which customers bought which products, you need to combine them. This is where joins come in.

An inner join is a specific method of combining two tables. It looks for a common column between them (like a CustomerID or ProductID) and returns only the rows that have a matching value in both tables.

Think of it like a strict guest list for a party. Table A has a list of people who were invited. Table B has a list of people who RSVP'd. An inner join gives you a final list containing only the people who appear on both the invite list and the RSVP list. If a person was invited but didn't RSVP, they're left out. If a person RSVP'd but wasn't on the original invite list, they're also left out.

Visually, an inner join represents the overlapping section of a Venn diagram. It’s the data that both of your tables have in common.

Why and When Should You Use an Inner Join?

You use an inner join when you want to analyze the relationship between two entities and only care about the data points that are directly related. It’s perfect for creating a clean, focused dataset that excludes incomplete or unmatched records.

Here are a few practical examples:

  • Sales and Product Data: Imagine you have a Sales table with TransactionID and ProductID, and a separate Products table with ProductID, ProductName, and Category. An inner join on ProductID would let you see exactly which product categories are selling the most. Orders for products that don't exist in your Products table would be excluded.
  • Customer Orders and CRM Data: You have an Orders table from your eCommerce platform and a Customers table from your CRM. An inner join on CustomerID or Email allows you to link purchase behavior to customer demographics, but only for customers who exist in both systems.
  • Website Users and Form Submissions: You can join Google Analytics user data with lead form submission data on a shared user ID. This helps you understand the behavior of users who converted into leads, filtering out all the visitors who didn't submit a form.

The main takeaway is that an inner join enriches one dataset with details from another, focusing exclusively on the overlap between them.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Before You Join: Prepping Your Data is Crucial

A successful join starts before you even drag a table onto the Tableau canvas. Taking a few minutes to prepare your data will save you headaches down the road. Focus on these three areas:

1. Identify the Common Field (Joining Key)

Your two tables need a shared column that contains the same information. This is called the "joining key" or "common field." This could be a unique identifier like:

  • OrderID
  • CustomerID
  • EmailAddress
  • SKU

Sometimes it’s a shared attribute like Region or CampaignName. Whatever it is, you must have this common link to tell Tableau how the two tables relate to each other.

2. Confirm Data Types Match

Tableau is smart, but it works best when the data types of your joining keys match. If ProductID is a number in one table, it should be a number in the other, not a text string. If they don’t match, the join may fail or produce incorrect results. You can easily change a field's data type in Tableau’s Data Source pane by clicking the icon next to the column name (# for numbers, Abc for strings).

3. Clean Your Joining Keys

Inconsistent data is the primary reason joins misfire. "Apple Inc." in one table and "Apple" in another won't match. Look for simple issues that can prevent a successful join:

  • Extra Spaces: Use the TRIM() function to remove leading or trailing spaces.
  • Capitalization: "CA" won't match with "ca". Use UPPER() or LOWER() to make them consistent.
  • Formatting: Make sure numbers and dates are formatted identically across both tables.

Step-by-Step: How to Make an Inner Join in Tableau

Once your data is ready, creating the join itself is straightforward. Let's walk through the process using a common example: joining an Orders table with a Customers table based on a shared Customer ID column.

Step 1: Connect to Your First Data Source

Open Tableau and in the Connect pane, select your data source type (e.g., Microsoft Excel, Text file, or a server like Microsoft SQL Server). Locate and open your first file, which we'll call Orders.

This table will appear on the Data Source canvas on the right.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 2: Add Your Second Data Source

From the Connections pane on the left, click "Add" to connect to another data source, or simply drag your second table (Customers) from the file list onto the canvas.

When you drag the Customers table near the Orders table, Tableau will display an orange line, often called a "noodle," between them. By default, Tableau creates a relationship, which is a flexible way of combining data. For our specific purpose, we need to create a classic join.

To do this, double-click the logical view of your Orders table. This opens the physical layer where you can create traditional joins.

Step 3: Create the Join Condition

Now, drag the Customers table onto the canvas next to the Orders table. You'll see an icon with two overlapping circles appear between them. This icon signifies that you have created a join.

Step 4: Select the Inner Join Type

Click on the join icon (the overlapping circles). A configuration window will pop up allowing you to define the join.

In this window, you will see four types of joins represented by Venn diagrams. Select the first option, the one with only the intersecting area shaded. This is the Inner Join.

Step 5: Define the Join Clause

Next, you need to tell Tableau which columns to use for matching rows. This is the "join clause."

Below the join type options, select the field from your first table (Orders) under "Data Source". Then, select the corresponding field from your second table (Customers).

Tableau often auto-detects fields with the same name. In our case, it would likely match Customer ID from the Orders table with Customer ID from the Customers table automatically. Still, it's always a good practice to verify this is correct.

Orders.'Customer ID' = Customers.'Customer ID'

Step 6: Review Your Data

Once you’ve configured the join, look at the data grid at the bottom of the screen. This preview shows you the result of your join. You should now see columns from both the Orders and Customers tables side-by-side. Scroll through to ensure the data looks as you expect.

You’re all set! Just click on a worksheet tab ("Sheet 1") to start building visualizations with your newly combined data.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Troubleshooting Common Inner Join Problems

Sometimes your join doesn't work as planned. Here are two of the most frequent issues and how to fix them.

1. Missing Data or Fewer Rows Than Expected

This is the most common "problem" users encounter with inner joins, but it's actually the join working as intended. If you expect 1,000 rows in your final dataset but only get 600, it means 400 rows from your first table did not have a matching Customer ID in the second table.

  • Solution: Investigate your joining keys. Are there typos? Extra spaces? Different data formats (e.g., "123" vs. "123.0")? Are there IDs in one table that simply don't exist in the other? If you want to keep all the records from one table regardless of whether they have a match, you may need a Left Join instead.

2. Duplicate Rows and Inflated Numbers

Sometimes after a join, you might see more rows than you started with in either table. For example, if you join one customer from your Customers table to their five purchases in the Orders table, that one customer's information will be duplicated five times in the resulting dataset.

This creates what is called a one-to-many relationship, and it can cause your measures (like Revenue or Sales) to be heavily inflated if you aren't careful. While this isn't an "error," it’s something you must be aware of.

  • Solution: Understand the relationship between your tables. In Tableau, you can use Level of Detail (LOD) calculations like {FIXED [Customer ID] : SUM([Sales])} to correctly aggregate measures without double-counting. Alternatively, consider using Tableau's Relationships feature (the default "noodle" connection) which handles these situations more automatically.

Final Thoughts

Mastering inner joins is a fundamental step toward more sophisticated analysis in Tableau. It’s the key to connecting scattered data sources into a single, cohesive view, allowing you to answer complex business questions by seeing how different parts of your data relate to one another.

Connecting data sources - whether in Tableau, Power BI, or even a simple spreadsheet - is often where the most time is lost. We built Graphed because we believe asking questions about your data shouldn't get bogged down in technical setups like joins and key configurations. You can connect all your marketing and sales platforms in a few clicks, and instead of manually joining tables, you just ask what you want to know. Graphed handles merging the data automatically so you can immediately get to the insights.

Related Articles