This post is about how to perform left join and right join in DAX, and in Power Query. If you need to refresh your memory about join types, you can read my post about it here.
NATURALLEFTOUTERJOIN is used to perform left join in DAX. Left join means combining two tables by taking all the rows from left table and only the matching ones from right table. Microsoft's definition for this function is exactly the same as their definition for NATURALINNERJOIN meaning somebody made a wrong copy-paste. Here comes their links:
https://docs.microsoft.com/en-us/dax/naturalleftouterjoin-function-dax
https://docs.microsoft.com/en-us/dax/naturalinnerjoin-function-dax
The syntax is pretty simple:
NATURALLEFTOUTERJOIN(<leftJoinTable>,
<rightJoinTable>)
Like I always do, I am going to explain it over an example. These are my tables that I'm planning the join.
If you look for a function to perform right join in DAX, you can't find any because there is none. Is that mean we can't perform right join in DAX? The answer is no. We can perform right join in DAX by using NATURALLEFTOUTERJOIN function. What a mouthful name! Anyway, we can perform right join with the same function only by changing the order of tables inside the formula. Power BI takes the whole table from the first parameter and only the matching ones from the second parameter. It looks like other than being mouthful, it also doesn't reflect the whole capacity of the function. The formula below shows how we can perform right join by using the same formula.
To perform right join or left join using Power Query we need to use Merge Queries or Merge Queries as New options. After that, we can choose Left Outer or Right Outer from the menu.

Comments