Forum Discussion
How to lookup values in another table in the Query Editor?
- 7 years ago
Hi Shelley,
Please check out the demo in the attachment. It's a solution in Power Query (the Custom column).
(let currentCustomer = [CustomerName] in Table.SelectRows(Table1, each [CustomerName] = currentCustomer)){0}[CustomerID]Best Regards,
Dale
Hi Shelley,
Please check out the demo in the attachment. It's a solution in Power Query (the Custom column).
(let currentCustomer = [CustomerName] in Table.SelectRows(Table1, each [CustomerName] = currentCustomer)){0}[CustomerID]
Best Regards,
Dale
(let currentCustomer = [CustomerName] in Table.SelectRows(Table1, each [CustomerName] = currentCustomer)){0}[CustomerID]
Intead of CustomerID if i want a static text say "Cust" to be entered in the custom column then what is the syntax to achieve this.
Also if the customer name present in table 2 is not present in table 1 I want to add another text say "NA".
For example if there is a customer G in table 2 and no entry for customer G in table 1 then I want to enter value as "NA" in custom column.
Thanks & Regards,
Sonam