Reputation: 60
I have two tables 'CompanyXSales' and 'Market Sales' Each with a primary key, and no primary key / foreign key relationship between the two. I would like to create this relationship, and make the link between these two tables, and therefore, add the column 'MarketSalesId' in 'CompanyXSales' where there will be its key relative to 'MarketSales'. To be a relative key, it suffices to check 3 conditions: -Have the same date -Have the same amount -Have the same country
Here is a sample PowerBiFile
How could i proceed that please ? knowing that i already created a "verify" column (with Dax Formula) in 'MarketSales' which equals to 1 if the conditions are verified 0 if not.
Upvotes: 0
Views: 6128
Reputation: 641
You can use merge query in Power Query to get the OrderKey
Column in MarketSales
Table.
And then create relationship between both tables.
Please below steps to get the OrderKey
Column in MarketSales
Table.
Now you can create relationship between both tables
Upvotes: 2