Forum Discussion
Nested join / join multiple tables in Power Query
- 9 years ago
Thanks for the reply, I'm happy to say I managed to obtain the result I needed, using Evaluate.Expression to retrieve the tables from the text names of the tables linked...
No, it's not possible to dynamically nested join tables. Even we can substring the values from FK columns, it's still not supported to get a table or list with its name in Power Query. So for your requirement, it can't be achieved with recursive function.
Regards,
- wodraeve9 years agoFrequent Visitor
Thanks for the reply, I'm happy to say I managed to obtain the result I needed, using Evaluate.Expression to retrieve the tables from the text names of the tables linked...
- v-sihou-msft9 years agoMicrosoft Employee
- wodraeve9 years agoFrequent Visitor
See code above. Basically I'm using a classic recursive function looping until a condition (in this case for this table no columns are listed as being a foreign key) is met.
For the basetable I get the list of foreign keys from a external table. For every foreign key I join with the table that has the name associated with that foreign key (hence the Expression.Evaluate).
It probably can go faster / cleaner using List.Generate but will try that one later.