Forum Discussion
Shelley
Post Prodigy
8 years agoHow to lookup values in another table in the Query Editor?
Does anyone know if/how this can be done? I have a table in the Query Editor that has a number of fields, one of which is the Customer #. I want to make a new column in this table that contains R...
- 8 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
Chihiro
Solution Sage
8 years agoMethods outlined in previous posts will handle it.
You just need to add another column/step to concatenate column values.
Using Column Merge tool, or adding custom column = [Column1] & [Column2]
Shelley
Post Prodigy
8 years agoChihiro, thanks for the input. Doesn't the Merge feature though make a big table with columns from both? In the end, I only want to add a key column. Would I merge them and then delete all the extra columns? I guess I've never really grasped Power BI's merge and append functions. They seem to work a little differently than I expect whenever I've tried to use them.