Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
purple_SP
Helper I
Helper I

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 1
lbendlin
Super User
Super User

Do not do merges in dataflows. That's not what they are there for.  Do your joins in the data model.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors