Upload all tables to the Power BI desktop to start the demonstration
We have three tables named “ Mock_Data,sheet1,and sheet2 ” respectively.
- In Mock_Data Table, we do not have “Date” and “Sales” information, which is there in the other two tables. So, in all the three tables, the common column is “ID.” So, using this, we need to fetch the data to “Mock_Data.”
- For “Mock_Data,” we need to fetch the values from the other two tables, so first, we will fetch “Date” from “Sheet1” Then, right-click on the “Mock_Data Table” and choose “New column.”
- Give the “New column” name as “Date”& Open the LOOKUPVALUE function now.
- The first argument is the “Result Column Name” since we are looking for the Date Value from “Sheet1,” choose the “Date” column name from “Sheet1_Table.”
- The next argument is “Search Column Name 1,” so this will be the “ID” column name from “Sheet1_Table.”
- The next argument is “Search Value,” so this will be a “ID” column name from “Mock-Data_Table.”
- We are done. Close the bracket and press the “Enter” key to get the result.
- There you go, we have got the result from “Date” from “Sheet1_Table.” But, when we look at the result column, it is not in a Date format. So, we need to change the Text format to the Date format.
- choose the “Format” as “Date,”data type and choose the date format.
- It will apply the format to the selected column as below.
- Similarly, we need to insert one more column to fetch “Sales” from “Sheet2_Table.” As usual, right-click and choose “New column,” give the name to the new column as “Sales.” Then, open the LOOKUPVALUE function again.
- This time “Result Column Name” will be from “Sheet2_Table,” i.e., “Sales.”
- The “Search Column Name” will be the “ID” column name from “Sheet2_Table.”
- The next argument is “Search Value,” so this will be the “ID” column name from “Mock-Data_Table.”
- Close the bracket and press the “Enter” key to get the “Sales” values.
- Finally you get the date And sales data from sheet1 and sheet2 tables to Mock-data as shown below
- Like this, using the Power BI LOOKUPVALUE function, we can fetch data from one table to another.
For any Help or Queries Contact us on info@crmonce.com or +918096556344