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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AliceW
Power Participant
Power Participant

Natural Left Outer Join in DAX?

Hello everyone,

This should be simple, but I can't find a solution, so I turn to you, kind strangers :0)

I need to merge two tables using NATURALLEFTOUTERJOIN. I need this in DAX instead of PowerQuery because, well, the dataset is too big and I get refresh errors.

I need to join, say, these two based on 'Opp ID'. And only keep the columns that appear in both tables once ('Close Date' and 'MCL')

 

Table 'Products'

Opp IDClose DateMCLParent ProductAmount
12326-04-2022AmplifyAPI Builder50000
12326-04-2022AmplifyAPI Manager20000
12326-04-2022AmplifyAPI Portal10000

 

Table 'Splits'

Opp IDClose DateMCLSplit OwnerPercentage
12326-04-2022AmplifyJohn Smith80%
12326-04-2022AmplifyNadia Moran20%

 

I tried this, but I got an error that 'an incompatible join column, 'Opp ID', was detected'.

Left Outer =
var SPLITTABLE =
SELECTCOLUMNS(Splits,"Opp ID",Splits[Opp ID],"Split Owner", Splits[Split Owner])
var PRODTABLE =
selectcolumns(Products,"Opp ID", Products[Opp ID],"Parent Product", Products[Parent Product])
return
NATURALLEFTOUTERJOIN(PRODTABLE,SPLITTABLE)
 
The result should look like this (did it in PowerQuery)
AliceW_0-1650974453203.png

 

 
Can anyone help, please?
Thank you,
Alice

 

1 ACCEPTED SOLUTION
PC2790
Community Champion
Community Champion

Try this:

Left Outer = 
var SPLITTABLE =
SELECTCOLUMNS(Splits,"Opp ID",Splits[Opp ID]+0,"Split Owner", Splits[Split Owner])
var PRODTABLE =
selectcolumns(Products,"Opp ID", Products[Opp ID]+0,"Parent Product", Products[Parent Product])
return
NATURALLEFTOUTERJOIN(PRODTABLE,SPLITTABLE)

Outcome as below:

PC2790_0-1650980577591.png

 

View solution in original post

5 REPLIES 5
PC2790
Community Champion
Community Champion

There are some considerations while using the function.

"There is no sort order guarantee for the results.
Columns being joined must have the same data type and the same name in both tables.
The columns considered for the join are those of the expanded table, not just the base table: two tables can be joined through common columns in related tables.
The columns used in the join condition that correspond to physical columns of the data model must also have the same data lineage; two columns with the same name and different data lineage generate an error.
Two columns with the same data lineage must have also the same full column name, which includes both table name and column name; otherwise, they are not matched for the join.
Strict comparison semantics are used during the join. There is no type coercion; for example, 1 does not equal 1.0."

Refer this for the same

AliceW
Power Participant
Power Participant

I have the same data type for the column I wish to use as a joiner... Not sure about the meaning of 'data lineage'...

PC2790
Community Champion
Community Champion

Try this:

Left Outer = 
var SPLITTABLE =
SELECTCOLUMNS(Splits,"Opp ID",Splits[Opp ID]+0,"Split Owner", Splits[Split Owner])
var PRODTABLE =
selectcolumns(Products,"Opp ID", Products[Opp ID]+0,"Parent Product", Products[Parent Product])
return
NATURALLEFTOUTERJOIN(PRODTABLE,SPLITTABLE)

Outcome as below:

PC2790_0-1650980577591.png

 

Hi,

Suppose, Performed left outer join Table having one more column like Id.

The Id Column should be join with more than one table. is it possible ?

I believe it perform join with one table only.

 

AliceW
Power Participant
Power Participant

Thank you so much, PC! Not sure why that pesky +0 was needed to 'break the lineage', but it works!!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.