Forum Discussion
Expanding a Merge Dynamically in Dataflows
Hello, I am working with Dataflows in Service and am trying to find a way to expand a merge dynamically (i.e. expand it without specifically referencing the column names in the M Language). The reason for this is that the tables I am working with are likely to have new columns added to them in the future, so I want to make sure that the logic doesn't break as new columns are added.
In Desktop, I was able to accomplish this with the following M Language, but when I try the same thing in Dataflows, the query doesn't save (when the 'Validating Queries' box pops up, it gets stuck at the "Waiting to fix issues" stage and eventually times out):
let
Source = Table.NestedJoin(table1, {"id", "date"}, table2, {"id2", "date2"}, "table2", JoinKind.Inner),
ColNames = Table.ColumnNames(Table.Combine(Source[table2])),
#"ExpandedData" = Table.ExpandTableColumn(Source,"table2",ColNames)
in
#"ExpandedData"
Is there an alternative method for achieving this in Dataflows?
1 Reply
- lbendlinSuper User
Do not do merges in dataflows. That's not what they are there for. Do your joins in the data model.