Locked lesson.
About this lesson
The lesson demonstrates how to use Power Query to replicate VLOOKUP's exact match functionality (without writing any VLOOKUPs!)
Exercise files
Download this lesson’s related exercise files. You can download source data files for the course from the resources section of your Lessons page.
Basic (Left Outer) Joins.xlsx25.1 KB Basic (Left Outer) Joins - Completed.xlsx
33.4 KB
Quick reference
Basic (Left Outer) Joins
A demonstration of merging using a basic Left Outer Join.
When to use
When you want to merge two tables of data, returning all records from the first table, and any matching records from the second table.
Instructions
Create staging queries for the source data tables
For each data source
- Create a new query that points to the data source
- Perform whatever transformations are required to clean up the data
- Finalize the query by choosing Home --> Close & Load To… --> Only Create Connection
Merge the staging queries
- Open the Queries & Connections pane in Excel
- Right click one of the tables you wish to merge --> Merge
- Choose the other table you wish to merge
- Select the column to use as the merge key (i.e. the one with values that are the same in both tables so that Power Query knows which records to match together) in both tables
- Choose the Join Kind and click OK
- Expand the new column(s) and choose which data to include
- Define the data types for the columns
- Rename the newly created query
- Finalize the query by loading it to the desired destination
Hints & tips
- Power Query works with previews, so if your tables contain a lot of data you may not see the full list of matches
- Non-subscription versions of Excel 2016 only have the Left Outer Join option available as one of the built-in join types
Lesson notes are only available for subscribers.