I intend to generate revenue results with two separate records, one with a customer transaction and another with a product list |
How I do: I create a new table that has all customers name. Search for the customer name in each report and add corresponding value like transaction made by that customer and which product customer has purchased.
How can I do it better: You can use the VLOOKUP formula throughout the table to find transaction amount and product of each customer. This will not only reduce your manual search work but will also highlight Customers who have done transaction but do not have any product details.
Click one of the following options according to your software preferences:
When finding items in a table or in a range by row, use VLOOKUP. For instance, check the price of a product in your sales report or find an customer's name based on email ID.
Microsoft Excel or Google Spreadsheet Pro Tip: Reference Table : Transaction Report
Actual Table:
=VLOOKUP(Reference Value, Array of the table that has return value, column number of the return value, True(Approximate match)/False(Exact Match)
STEP 1: Add reference value in a cell. Type the following formula and add atleast three parameters.
Select the reference cell as first parameter: =VLOOKUP(Select the Reference Cell Value) From above example: =VLOOKUP(D1)
Note: Type ","(comma) after each parameter. The VLOOKUP formula will only return value if it is a single, non repeated search value. STEP 2: Enter the following arguments:
You can also type the following:=VLOOKUP(Select the value to search for, Table, index number of Column that has return value,) Example 1: =VLOOKUP(D1,A:B,2) Example 2: Now, if you have values in another sheets you can type the following:=VLOOKUP(D1,Sheet Name!A:B,2,) STEP 3: (Optional) Enter one of the following as forth parameter
Example: =VLOOKUP(D1,A:B,2, True)
In this case, if you are searching for corresponding value of "John K", the formula will return 20 instead of 45 as the first instance matched was "John" and not "John K" But, if you write forth parameter as FALSE i.e. =VLOOKUP(D1,Sheet Name!A:B,2,FALSE), the formula will return value after matching the whole string
Once you set whole formula, you can drag (+) icon the formula across the rows to find all corresponding value of each reference cell
Result:
|
ABOUT:
When finding items in a table or in a range by row, use LOOKUPVALUE. For instance, populate the price of a product in your sales report or get an customer's name based on email ID.
Power BI Pro Tip: Example:
Reference Table:
Lookup Table:
STEP 1: Go to Table, and click Table Tool > New Column. STEP 2: You must type the formula in following format:
Lookup value = LOOKUPVALUE('Reference Table'[Sales Amount],'Reference Table'[Name],'Lookup Table'[Name]) STEP 3: In POWER BI, you also have option to return value based on two matches. You must type the formula in following format:
Lookup value = LOOKUPVALUE('Reference Table'[Sales Amount],'Reference Table'[Name],'Lookup Table'[Name],'Reference Table'[Date],'Lookup Table'[Date] ) Result:Lookup Table:
|
Comments
Post a Comment
Thank you! for visiting this site.