Forum Discussion
Shelley
Post Prodigy
7 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...
- 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
Shelley
Post Prodigy
7 years agoYes, the same customer# can be responsible for more than one region. I also have a number of diverse fact tables. So I need the unique key to tie all the fact tables together correctly.
MFelix
Super User
7 years agoHi Shelley,
The using merge you can select what columns to show after merge and then you can delete the additionals after making the ID column.
However believe that the best setup is not.this.you should have a customer.table as you have and a region table thenake the.connection between tables.using.this.two.tables.
Can you share some.sample.data and expected result?
Regards.
MFelix
The using merge you can select what columns to show after merge and then you can delete the additionals after making the ID column.
However believe that the best setup is not.this.you should have a customer.table as you have and a region table thenake the.connection between tables.using.this.two.tables.
Can you share some.sample.data and expected result?
Regards.
MFelix