The LOOKUP function is common in data representation. Just like Excel, the VLOOKUP function in Power BI is one of the extensively used LOOKUP functions. However, it is not built into Power BI. You’ll have to replicate the LOOKUP function using DAX for the VLOOKUP function in Power BI.
In this guide, you’ll discover what Vlookup in Power BI is, why Power BI Vlookup is important, and when to use the Vlookup function in Power BI.
First…
In Power BI, VLOOKUP is not directly used in Excel. However, it would help if you used DAX (Data Analysis Expressions) functions like LOOKUPVALUE or RELATED to perform similar lookups.
Use lookup functions like LOOKUPVALUE and RELATED when you need to:
Let’s say you have three tables: “Sales,” “City,” and “Manager.”
Copy the data to an Excel file and import it to Power BI as an Excel file reference. You should also download the Excel workbook from the link below, and that’s what is being used in this illustration.
Upload the tables to Power BI.
A close look at the “Sales_Table” shows that there are no “Region Names” and “Manger” names. You can fetch the data from the other two tables. There is “City” as the common column or value among these tables.
With the LOOKUPVALUE DAX function, you can fetch the data from other tables to the “Sales Table.” Here’s the syntax of the LOOKUPVALUE DAX function.
Pro Tip: Search_Column Name and Search Value should be the same in both tables.
For instance, in the above tables:
Close the bracket and press the “Enter” key. You’ll get a new “Sales Table” column as “Regions.”
You’ll have to fetch the “Manager Names” from the “Manager Table.” Right-click on the “Sales_Tabel” and choose “New Column.” You’ll have to name the column, name it “Manager.”
Open the LOOKUPVALUE function again.
You’ll need results from “Manager_Table.” The Result_Column Name will be “Manager” from “Manager_Table.”
You’ll have to select the “Search_Column” name. From “Manager_Table” based on “City” you’ll be fetching the data. Choose the “City” column from “Manager_Table.”
Search Value will also be “City” name but from “Sales_Table.”
Close the bracket and press the “Enter” key to get the “Manager” names as the new column.
That’s how to use the LOOKUPVALUE DAX function in Power BI to replicate VLOOKUP in Power BI.
Stage 1: Logging in to Power BI
Country | Revenue Stream | Revenue (in $) |
USA | Digital Advertising Revenue | 39,620,000 |
USA | Event Marketing Revenue | 10,670,000 |
USA | Content Marketing Revenue | 5,580,000 |
USA | Print & Outdoor Revenue | 455,270 |
UK | Digital Advertising Revenue | 40,710,000 |
UK | Event Marketing Revenue | 24,770,000 |
UK | Content Marketing Revenue | 6,330,000 |
UK | Print & Outdoor Revenue | 552,190 |
DNK | Digital Advertising Revenue | 47,040,000 |
DNK | Event Marketing Revenue | 29,070,000 |
DNK | Content Marketing Revenue | 7,740,000 |
DNK | Print & Outdoor Revenue | 600,690 |
DNK | Media Relations Revenue | 106,430 |
AUS | Digital Advertising Revenue | 53,790,000 |
AUS | Event Marketing Revenue | 38,530,000 |
AUS | Content Marketing Revenue | 6,590,000 |
AUS | Print & Outdoor Revenue | 9,040,000 |
AUS | Media Relations Revenue | 6,130,000 |
FR | Digital Advertising Revenue | 57,860,000 |
FR | Event Marketing Revenue | 50,450,000 |
FR | Content Marketing Revenue | 3,560,000 |
FR | Print & Outdoor Revenue | 18,790,000 |
FR | Media Relations Revenue | 15,460,000 |
IND | Digital Advertising Revenue | 60,470,000 |
IND | Event Marketing Revenue | 63,200,000 |
IND | Content Marketing Revenue | 2,080,000 |
IND | Print & Outdoor Revenue | 29,500,000 |
IND | Media Relations Revenue | 30,020,000 |
The following video will help you create a Comparison Bar Chart in Microsoft Power BI.
Here are the best practices for using lookup functions in Power BI:
VLOOKUP is not directly used in Power BI. You can use DAX functions like LOOKUPVALUE or RELATED to achieve similar results like looking up and integrating data between tables.
No, VLOOKUP is not a DAX function. In Power BI, similar functionality is achieved using DAX functions like LOOKUPVALUE and RELATED for data integration and lookups.
In Power BI, RELATED and LOOKUPVALUE are used as replacements for VLOOKUP. LOOKUPVALUE retrieves values based on criteria, while RELATED fetches values from related tables.
VLOOKUP in Power BI is replaced by RELATED and LOOKUPVALUE. These functions are used for integrating data, enriching reports, and performing advanced analysis. They can also be used to effectively link tables.
To get the best out of VLOOKUP in Power BI, you’ll have to keep things simple. Use lookups when necessary, and always keep the formulas straightforward. All these help maintain readability and ease of maintenance.
You should also verify the lookup results. This will help you ascertain that the results align with the expected outcomes. All these come in handy when identifying and correcting any data integrity issues.
Always define relationships. And that can be done by using data models to establish relationships between tables. This way, it becomes easy for the RELATED function to efficiently fetch related data.
By following the steps in this guide, users will become proficient in using Power BI to create interactive and engaging visualizations.