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
I tried to apply the formula to create a custom "lookup" column but it fails.
(let QId = [Q-C] in Table.SelectRows(Metadata, each [Q-C] = QId)){0}[Question]
Error: Invalid identifier and red line appear below "in" in above formula.
I have "Metadata" table that contains columns Q-C, Questions.
In another table "QwC" I have column Q-C and where ever value of "QwC-QC" matches "Metadata-Q-C", populate the custom column "Question" in "QwC" with value of "Metadata-Question"
Thank you in advance for any help in this regard.