Press "Enter" to skip to content

Replicating VLOOKUP with M

Erik Svensen shows how we can replicate one of the most powerful Excel functions in Power Query using the M language:

The function takes 4 arguments –
lookupValue – The value to find – can be any type
lookupTable – The Table/Query to lookup in
lookupColumnName – The name of the column to lookup the value in
returnColumnValue – The name of the column from the table to return

Click through to get the code.