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.

Related Posts

Storing Large Images in Power BI

Chris Webb shows us how to store a large image in Power BI: Jason Thomas and Gerhard Brueckl have both blogged on the subject of storing images as text inside a Power BI dataset: Since they wrote those posts, however, Power BI has added the ability to set the Data Category property on measures as […]

Read More

Power BI Connection String Capitalization

Slava Murygin ran into a problem with capitalization on connection strings with Power BI Report Server: The message actually says:“Several errors occurred during data refresh. Please try again later or contact your administrator.”SessionID: 1b80301e-3898-417a-af9c-2e77ec490728[0] -1055784932: Credentials are required to connect to the SQL source. (Source at SQLServerName;DBA_Pro.). The exception was raised by the IDbCommand interface.[1] […]

Read More


March 2019
« Feb Apr »