Forum Discussion

capko's avatar
capko
Icon for Helper II rankHelper II
2 years ago

Left outer join with many to many relationship

I'm facing a problem with Power BI and a NATURALLEFTOUTERJOIN. I have two tables that I would like to join using a left outer join but I have a many to many relationship and the documentation says it's not possible unless a many to one relationship exists.

 

I cannot use Power Query since the first table is a calculated one (not visible in Power Query). I created a simplified example that I'm trying to solve in order to apply the solution to the real model.

 

The first table (1) look like this:

 

 

The second one (2) like this:

 

And the result one will be like this:

 

When I stablish a many to many between (1) and (2) and I try to create a new table using NATURALLEFTOUTERJOIN(Table_1;Table2) I get the following error:

 

 

Which is logical due to the many to many relationship.

 

There is really no way to do a NATURALLEFTOUTERJOIN if the relation is many to many ? Any other way to do this operation in DAX ?

2 Replies