Forum Discussion
DJPrometheus
5 years agoMicrosoft Employee
Reflexive Table Reference
Can a table in a Power Query/M reference itself? E.g. populate a column with the name of the current table through Add Custom Column?
- 5 years ago
No DAX is involved at all. This is the Power Query language M.
The code I gave is what you would use in the Advanced Editor to define your combined query. The whole thing would look something like this:let Source = Table.FromColumns({{#"BMX Bikes", #"Mountain Bikes", #"Hybrid Bikes"}, {"BMX Bikes", "Mountain Bikes", "Hybrid Bikes"}}, {"Table", "ItemType"}), #"Expanded Table" = Table.ExpandTableColumn(Source, "Table", {"Serial", "Status", "Shipped"}, {"Serial", "Status", "Shipped"}) in #"Expanded Table"
DJPrometheus
5 years agoMicrosoft Employee
I'm still a bit confused - are you saying let the queries populate and then run this in DAX against the model? I was trying to do the transform as part of the initial querying of the data source (web).