Forum Discussion
Hinnantj
2 years agoFrequent Visitor
Append Repeated Values to Multiple Item Rows
I have two separate, non-related, tables. I want to add all the data from one table to each item on the other table. Table 1: Item B627 B630 B642 B643 B646 B647 BA04 BA14 BA15 Tab...
- 2 years ago
M code
NewStep=#table(Table.ColumnNames(Table1)&Table.ColumnNames(Table2),List.TransformMany(Table.ToRows(Table1),each Table.ToRows(Table2),(x,y)=>x&y))
DAX
NewTable=GENERATE(Table1,Table2)
Syndicate_Admin
Administrator
2 years agolet
Source = #"Table 1",
#"Added Custom" = Table.AddColumn(Source, "Custom", each #"Table 2"),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Month_Year"}, {"Month_Year"})
in
#"Expanded Custom"