SUSTAINABILITY in Power BI
Apart from the importance of VLOOKUP function, we can use the same function in Power BI



What does the LOOKUPVALUE function in Power BI do?
The REFERENCE VALUE function is similar to the REFERENCE function in MS Excel, which searches for the required column from one table to another based on the search value. Since we already know enough about SVERWEIS, we won’t go into this function in depth in theory, so let’s take a look at the scenario now.
I have three tables with me. Below are the screenshots.

We have three tables with the names “Product_Table, Tax-Table and Discount_Table”.
In Product_Table we have no information on “Tax %” and “Discount %”, which are available in the other two tables. The common column of all three tables is “Product”, so we have to retrieve the data in “Product_Table”.
Before we use the LOOKUPVALUE function, let’s take a look at the syntax of this function.
Result column name: This is no different from other tables from whose column we need the result. As an example, we need results from the “Tax %” column for “Tax_Table” and results from the “Discount %” column for “Discount_Table”.
Name of the search column: This is no different than in the target table (Tax_Table or Discount_Table), based on the column in which we are looking for the result column. Our search value: This is the column name in the current table (Product_Table), which is identical to the column in the search column name of other tables.
Ultimately, the search column name and search value should be the same for both columns. The name of the search column comes from the result column table, and the search value column comes from the current table in which we are using the LOOKUPVALUE function.

Example of the DAX function LOOKUPVALUE in Power BI
You can download this Power BI
Above is the data we use to apply the LOOKUPVALUE-Dax function in Power BI
1. upload all three tables to the Power BI

2. for “Product_Table” we have to get the values from the other two tables, so we first get “Discount %” from “Discount_Table”. Right-click on “Product_Table” and select “New column”.
3. give the “New column” the name “Discount %”.
4. now open the LOOKUPVALUE function.
5. the first argument is the name of the result column, as we are looking for the discount percentage from “Discount_Table”. Select the column name “Discount %” from “Discount_Table”.

6. the next argument is the name of search column 1, so this is the column name “Product” from “Discount_Table”.
7. the next argument is the search value, so this will be a “Product” column name from “Product_Table”.

8 Okay, we’re done. Close the bracket and press the Enter key to get the result.

Here we have the result of “Discount %” from “Discount_Table”. But when we look at the result column, it is not in percentage format, so we need to change the number format to percentage format.
9. go to the “Modeling” tab, select “Percent” as the “Format” and keep the decimal place at 2.
10. this applies the format as below to the selected column.
11 Similarly, we now need to insert another column to get “Tax %” from “Tax_Table”. Right-click as usual and select “New column”, give the new column the name “Tax %” and open the LOOKUPVALUE function again.
12. this time the name of the result column comes from “Tax_Table”, i.e. “Tax %”.

13 The name of the search column is the column name “Product” from “Tax_Table”.

14 The next argument is the search value, so the column name “Product” from “Product_Table” is used.

15. close the bracket and press the Enter key to obtain the “Tax %” values.

For example, we can use the Power BI
Note: The Power BI
Dieser Beitrag ist auch verfügbar auf: Deutsch (German)

Leave a Reply