How to Do VLOOKUP in Tableau

Cody Schneider8 min read

If you're coming from a world of spreadsheets, VLOOKUP is probably one of your most-used formulas. It’s the go-to function for pulling information from one table into another. So, it’s completely natural to open Tableau for the first time, connect your data, and look for the VLOOKUP equivalent. You’ll quickly find that Tableau doesn’t have a function with that name, but don't worry - it has something much more powerful. This article will show you how to perform VLOOKUP-style operations in Tableau using its core data modeling features, which are far more scalable and flexible than any spreadsheet formula.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Why Is There No VLOOKUP Function in Tableau?

The biggest reason Tableau doesn't have VLOOKUP is a fundamental difference in how it interacts with data compared to Excel. Excel is a cell-based application. Its functions, like VLOOKUP, are designed to look at a specific value in a cell, search for a match in a defined range of other cells, and return a value from a neighboring cell. It operates one cell at a time.

Tableau, on the other hand, is built on the principles of database logic. It doesn't see your data as a grid of individual cells, it sees it as structured tables with rows and columns. Instead of looking up a single cell, Tableau is designed to combine entire tables based on relational rules. This approach is significantly more efficient and powerful, especially when working with millions of rows of data where a spreadsheet would grind to a halt.

The primary ways Tableau achieves this are through:

  • Relationships: The modern, flexible way to define connections between tables without physically merging them upfront.
  • Joins: The traditional method for physically combining data from two or more tables into a single, wider table.
  • Data Blending: A method used to combine aggregated data from different, separate data sources directly within a worksheet.

Let's walk through how to use each of these methods to get the same - and better - results than you would with VLOOKUP.

Method 1: Using Table Relationships (The Modern “VLOOKUP”)

Since Tableau 2020.2, "Relationships" have become the default and recommended way to combine data. They are much more flexible and often more performant than traditional joins. Think of a relationship as telling Tableau how two tables are related without forcing them into a single, merged table right away. Tableau intelligently queries the tables based on the fields you use in your visualization.

This is the closest modern equivalent to a VLOOKUP mindset, as you're essentially telling Tableau, "When I need something from this second table, here's the matching field to use."

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Example: Combining Sales Data with Product Details

Imagine you have two data tables:

  1. Sales Orders: Contains OrderID, CustomerID, ProductID, and Sales.
  2. Product Information: Contains ProductID, ProductName, and Category.

Your goal is to analyze sales by Category, but the Category field only exists in the Product Information table. In Excel, you'd use a VLOOKUP to pull the Category into the Sales Orders sheet. In Tableau, you use a relationship.

Step-by-Step Guide to Creating a Relationship

1. Connect to Your Data: In Tableau Desktop, connect to your data source (e.g., an Excel file with both tables on separate sheets). Both the "Sales Orders" sheet and the "Product Information" sheet will appear in the left-hand pane.

2. Drag Your Tables to the Canvas: Drag your primary table, in this case, "Sales Orders," onto the canvas. It will appear as a box.

3. Relate the Second Table: Next, drag the "Product Information" table and drop it onto the canvas. Tableau will automatically try to create a relationship, which appears as an orange line (or "noodle") connecting the two boxes.

4. Configure the Relationship: Click on the orange noodle to configure the relationship details. Tableau is smart and will likely have correctly identified that ProductID is the common field between the two tables. If not, you can manually select the matching fields. Make sure the 'Relationship fields' are set correctly (ProductID from Sales Orders = ProductID from Product Information) and close the dialog.

5. Build Your Visualization: That's it! Go to a worksheet. In the Data pane on the left, you'll see both tables listed. You can now pull fields from either table as if they were one. Drag Category (from the Product Information table) to the Rows shelf and Sales (from the Sales Orders table) to the Columns shelf. Tableau automatically handles the "lookup" in the background, showing you the total sales for each product category.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Method 2: Using Joins (The Classic “VLOOKUP”)

Before relationships, joins were the primary way to combine data in Tableau. A join physically merges tables into a single source of data before you start analyzing. This is less flexible than relationships but is still incredibly useful and sometimes necessary for specific data models.

A Left Join is the direct equivalent of a standard VLOOKUP in Excel. It takes all the rows from your "left" table (your primary table) and pulls in any matching row information from the "right" table.

Step-by-Step Guide to Creating a Left Join

Using the same Sales Orders and Product Information example:

1. Connect to Your Data Source: Just like before, connect to your Excel file containing the two sheets.

2. Open the Physical Layer: Drag the "Sales Orders" sheet onto the canvas. It's now in what's called the logical layer. To create joins, you need to enter the physical layer. To do this, simply double-click the "Sales Orders" box.

3. Add and Configure the Join: Now that you're in the physical layer, drag the "Product Information" sheet and drop it to the right of the "Sales Orders" box. A Venn diagram icon for the join clause will appear. Click this icon to configure the join type.

By default, Tableau may select an "Inner Join." Select "Left" instead. This ensures all your sales orders are kept, and product information is brought in where it exists. Ensure the join clause is on the correct fields (ProductID = ProductID).

You’ll now see a preview of the new, wider combined table at the bottom of the screen. All columns from both tables are present in one view.

4. Proceed to Your Worksheet: As with relationships, navigate to a worksheet. In the Data pane, you’ll see all the fields from the combined table ready to use. You can now build the same visualization: Sales by Category.

Joins vs. Relationships: What's the Difference?

  • Relationships (Logical Layer): Tables remain separate. Tableau queries them at their native level of detail. It is more flexible and generally preferred.
  • Joins (Physical Layer): Tables are physically merged into one flat table before analysis. This can sometimes cause data duplication if the relationship isn't clean (e.g., one sales order ProductID matching multiple entries in the product table).

Method 3: Data Blending for Different Data Sources

What if your Sales Orders are in a PostgreSQL database and your Product Information is in a Google Sheet? In this scenario, you probably can't join them at the database level. This is where Data Blending comes in handy. It’s Tableau’s method for combining data from disparate, published data sources on a sheet-by-sheet basis.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step-by-Step Guide to Data Blending

1. Connect to Both Data Sources: First, connect to your primary data source (PostgreSQL database with Sales Orders). Then, use the "Add" button under Connections to connect to your secondary data source (Google Sheets with Product Info).

2. Establish the Primary Source in the Worksheet: In a worksheet, select your primary source ("Sales Orders"). Drag a field from it onto your view - for example, drag Sales to Columns. The blue checkmark next to the data source name confirms it's the primary one for this sheet.

3. Activate the Blending Link: Now, select your secondary data source ("Product Information"). In the Dimensions list, Tableau will try to identify a common, linking field between the two sources. In our case, this is ProductID. A small, broken link icon will appear next to it. Click this to make it an active link, shown by a solid orange link icon.

4. Blend in Data From the Secondary Source: Once the link is active, drag a field from the secondary source onto your view. For instance, drag Category to the Rows shelf. The final view will show sales split by category. An orange checkmark will now appear on your secondary source, indicating it is being blended in.

The key thing to know about data blending is that it aggregates data from the secondary source before displaying it. That’s why it works best for combining summary-level data (like sales targets) with more granular data (like individual sales transactions).

Final Thoughts

Replacing your familiar VLOOKUP is really about shifting from a cell-based mindset to a table-based one. While there isn’t a specific formula called VLOOKUP in Tableau, its core features like Relationships, Joins, and Data Blending empower you to combine data in ways that are far more robust, scalable, and automated than any spreadsheet function.

Manually connecting, joining, and cleaning data is a big part of analytics, but it's often the most time-consuming step before you even get to the insights. At Graphed , we built a tool to eliminate this friction entirely. Instead of configuring joins and relationships across platforms like Shopify, Google Analytics, and Salesforce, you just connect your sources and ask questions in plain English. Want to see sales revenue by campaign from your CRM and Ad Platform? You just have to ask, and we'll connect the data, do the blending, and visualize the answer for you in a real-time dashboard, which keeps itself updated automatically.

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!