How do I make a left join in DAX? When I try to add a relation or using the external DAX connection function, I get the following errors (see below). Any ideas would be greatly appreciated!
Error creating relationship:

Error trying NaturalLeftOuterJoin ()

For reference, I am trying to create the profit and loss statement calculation lines.
Example:
- Income: 100
- Cost: 80
- Profit: 20 (Income Value)
My tables are as follows:
Fact table:
╔════════════════════════════════════════╗
║ YearMonth ║ StoreID ║ AccountID ║ Amount ║
╠════════════════════════════════════════╣
║ 2017-01 ║ A ║ 1 ║ 100 ║
║ 2017-01 ║ B ║ 1 ║ 200 ║
║ 2017-01 ║ A ║ 2 ║ -50 ║
║ 2017-01 ║ B ║ 2 ║ -50 ║
║ 2017-02 ║ A ║ 1 ║ 20 ║
║ 2017-02 ║ B ║ 1 ║ 150 ║
║ 2017-02 ║ B ║ 2 ║ -20 ║
╚═══════════╩═════════╩═══════════╩════════╝
Template table:
╔════════════╦═══════════╦═════════╗
║ TemplateID ║ AccountID ║ Line ║
╠════════════╬═══════════╬═════════╣
║ 105 ║ 1 ║ Revenue ║
║ 105 ║ 2 ║ Cost ║
║ 105 ║ 1 ║ Profit ║
║ 105 ║ 2 ║ Profit ║
╚════════════╩═══════════╩═════════╝
SQL - AccountID, Profit, :
SELECT
f.[YearMonth]
,f.[StoreID]
,f.[AccountID]
,f.[Amount]
,t.[TemplateID]
,t.[AccountID]
,t.[Line]
FROM [dbo].[Fact] f
left join [dbo].[Templates] t
on f.[AccountID] = t.[AccountID]
:
╔═══════════╦═════════╦═══════════╦════════╦════════════╦═══════════╦═════════╗
║ YearMonth ║ StoreID ║ AccountID ║ Amount ║ TemplateID ║ AccountID ║ Line ║
╠═══════════╬═════════╬═══════════╬════════╬════════════╬═══════════╬═════════╣
║ 2017-01 ║ A ║ 1 ║ 100 ║ 105 ║ 1 ║ Revenue ║
║ 2017-01 ║ B ║ 1 ║ 200 ║ 105 ║ 1 ║ Revenue ║
║ 2017-02 ║ A ║ 1 ║ 20 ║ 105 ║ 1 ║ Revenue ║
║ 2017-02 ║ B ║ 1 ║ 150 ║ 105 ║ 1 ║ Revenue ║
║ 2017-01 ║ A ║ 2 ║ -50 ║ 105 ║ 2 ║ Cost ║
║ 2017-01 ║ B ║ 2 ║ -50 ║ 105 ║ 2 ║ Cost ║
║ 2017-02 ║ B ║ 2 ║ -20 ║ 105 ║ 2 ║ Cost ║
║ 2017-01 ║ A ║ 1 ║ 100 ║ 105 ║ 1 ║ Profit ║
║ 2017-01 ║ B ║ 1 ║ 200 ║ 105 ║ 1 ║ Profit ║
║ 2017-02 ║ A ║ 1 ║ 20 ║ 105 ║ 1 ║ Profit ║
║ 2017-02 ║ B ║ 1 ║ 150 ║ 105 ║ 1 ║ Profit ║
║ 2017-01 ║ A ║ 2 ║ -50 ║ 105 ║ 2 ║ Profit ║
║ 2017-01 ║ B ║ 2 ║ -50 ║ 105 ║ 2 ║ Profit ║
║ 2017-02 ║ B ║ 2 ║ -20 ║ 105 ║ 2 ║ Profit ║
╚═══════════╩═════════╩═══════════╩════════╩════════════╩═══════════╩═════════╝
:
╔═════════╦═════════╦═════════╗
║ Line ║ Store A ║ Store B ║
╠═════════╬═════════╬═════════╣
║ Revenue ║ 120 ║ 350 ║
║ Cost ║ -50 ║ -70 ║
║ Profit ║ 70 ║ 280 ║
╚═════════╩═════════╩═════════╝
DAX - , - , ! , " ", . , , DAX, SQL, , DAX. !