CUSTOMISED
Expert-led training for your team
Dismiss
Alteryx: How to VLOOKUP

24 August 2023

Alteryx: How to VLOOKUP

The VLOOKUP function is an essential tool for linking and enriching data in Alteryx. This guide will demonstrate how to perform VLOOKUPs in Alteryx to append columns from one data set to another based on a common key. 

JBI Training offers a complete solution for all of your or your teams training in Alteryx to find out about our Alteryx training course simply get in contact we we will be happy to assist. 

What is VLOOKUP in Alteryx?

VLOOKUP stands for Vertical Lookup. It searches vertically through a lookup table to find and return the corresponding row for a searched key. This allows you to add columns of supplementary data from one table to another integrated by a shared unique identifier.

For example, you may have a Customer table with basic client info like name and address. You also have an Orders table that contains order details linked by CustomerID. VLOOKUP lets you search the Orders table by CustomerID, retrieve the matching row, and append the order details to the Customer table.

When to Use VLOOKUP in Alteryx

Common uses cases for VLOOKUP in Alteryx include:

  • Augmenting a core table with additional attributes from another table
  • Bringing in lookup data like customer names or product details
  • Appending transaction details from a details table to a master table
  • Adding supplemental demographic data to enrich customer profiles
  • Integrating reference data like weather or location data

VLOOKUP offers more flexibility than joins by letting you selectively append columns without merging entire tables.

How VLOOKUP Works in Alteryx

Performing a VLOOKUP in Alteryx involves:

  1. A lookup value from the primary table you want to find in the lookup table
  2. A lookup table containing supplementary data
  3. A common unique identifier field in both tables
  4. Reference columns in the lookup table to append to the primary table

Alteryx will search down the lookup table ID field for the lookup value, retrieve the matching row, and return the reference column data.

VLOOKUP Tools in Alteryx

Alteryx offers three tools for performing vertical lookups:

Join Tool

The Join tool has a lookup join type that functions as a VLOOKUP:

  1. Connect primary and lookup tables to Join
  2. Select the lookup join type
  3. Choose the ID field to match on
  4. Select reference columns to append

The Join tool retrieves the lookup data and merges it directly into the primary table.

Appending Data Tool

The Appending Data tool can lookup additional fields:

  1. Connect the primary table to Appending Data
  2. Add the lookup table and choose the ID field
  3. Select the reference columns to append

This performs the lookup and appends the data without joining the tables.

Multi-Row Formula Tool

The Multi-Row Formula tool allows VLOOKUP logic:

Lookup([LookupID], [LookupTable], [LookupID], [ReferenceColumn])

This formula searches the lookup table dynamically to find and return the lookup value.

Step-by-Step VLOOKUP in Alteryx

Follow these steps to perform a VLOOKUP in Alteryx:

1. Import Data

Import the primary and lookup Alteryx tables with a shared unique ID field like CustomerID.

2. Add VLOOKUP Tool

Add your chosen VLOOKUP tool (Join, Appending Data, or Formula).

3. Configure VLOOKUP Settings

Configure the VLOOKUP settings:

  • Primary lookup field (CustomerID)
  • Lookup table
  • Reference columns to append

4. Connect Lookup Output

Connect the appended lookup data to the next steps in your workflow.

5. Validate Results

Use the Sample tool to validate the VLOOKUP matched rows and returned the correct data.

VLOOKUP Limitations

Be aware of the following limitations when using VLOOKUP in Alteryx:

  • lookup tables must have a unique ID field with no duplicates
  • lookup values must exactly match the lookup ID field
  • multiple matches will return only the first match
  • lookup table must contain the reference columns to append

Correct reference data structure and relationships is key for successful lookups.

Advanced VLOOKUP Techniques

Fuzzy Matching

Fuzzy matching can overcome spelling mistakes and formatting discrepancies in lookup fields. Use tools like the Fuzzy Match formula.

Multiple Matches

Alteryx options like Cross Join and Outer Join can return multiple lookup matches if needed.

Nested Lookup Logic

Chain together multiple VLOOKUP steps to lookup data from tables beyond the initial reference table.

In-Database Lookup

Use In-DB tools to perform faster, scalable lookups on very large datasets using native database querying.

Conclusion

VLOOKUP is a versatile operation for linking tables, augmenting data, and unlocking value from reference data. Alteryx provides flexible tools and approaches for both simple and complex lookup logic. Follow best practices around data prep and structure for reliable lookups. With creative use of VLOOKUPs, you can enrich your analytics and take your Alteryx workflows to the next level.

This is part of an ongoing series of articles, if you enjoyed this one you might enjoy alteryx how to remove duplicates or alteryx how to export to excel

About the author: Daniel West
Tech Blogger & Researcher for JBI Training

CONTACT
+44 (0)20 8446 7555

[email protected]

SHARE

 

Copyright © 2024 JBI Training. All Rights Reserved.
JB International Training Ltd  -  Company Registration Number: 08458005
Registered Address: Wohl Enterprise Hub, 2B Redbourne Avenue, London, N3 2BS

Modern Slavery Statement & Corporate Policies | Terms & Conditions | Contact Us

POPULAR

Rust training course                                                                          React training course

Threat modelling training course   Python for data analysts training course

Power BI training course                                   Machine Learning training course

Spring Boot Microservices training course              Terraform training course

Kubernetes training course                                                            C++ training course

Power Automate training course                               Clean Code training course