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
v-jiascu-msftThanks for the help, Dale! I got it to work!
I was experiencing a couple errors due to bad data.
1. I discovered a data type mismatch - i.e. the data type on the distributor ID in one table was different than the other table - so I was receiving an error. I changed the data types to match and then this part worked.
2. Some of the distributor IDs were null or not in the master table and so some of the cells in the column again gave the same error. I didn't need these records, so I removed the errors.
I don't remember the exact wording of the error - something about enumerations. (I had this all typed out and then Microsoft took the site down for maintenance and everything I wrote was lost.)
THANKS AGAIN!!