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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Relationship between two tables with partial matching countries

Hi all,

 

I have two separate table a customer table and a sales table and i would like to display the country's sales and #of customers in the same table. 

However, the country list in each table is not 1:1 compatible.

Here are the two tables.

 

I would like to somehow join them together, and keep the sales table country list, then just leaving the customer raw lines empty if no values are found in the customer table.

 

I also have a calendar table that is currently combined between Customer & Calendar.... and Sales table & Calendar.. (displayed in picture further down)

 

Sales table (country list)Customer Table
AustraliaAustralia
AustriaAustria
BelgiumBelgium
BrazilCanada
CanadaChina
ChinaDenmark
COSTCOFrance
CzechGermany
DenmarkItaly
Distributor SalesJapan
Distributors – NJHKorea
Distributors – NJH (Netherlands
FinlandNew Zealand
FranceNorway
GermanySingapore
IndiaSpain
ItalySweden
JapanSwitzerland
Japan NJHUK
Kind KAUS-BT
KoreaUS-Costco
NetherlandsUS-Interton
New ZealandUS-Other
NorwayUS-RS
SingaporeUS-VA
Spain 
Sweden 
Switzerland 
UK 
US Audigy Group 
US Audigy Retail 
US BT 
US Interton 
US Operations RS 
US RS 
US RS Corporate 
VA 



 

Essentially i want to display a table like this:

 

cap2.JPG

 

 

 

 

cap2.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found a solution using a bridging table.

 

Here are the steps

 

1. Export all country tables to excel files

2. Append all countries in 1 column and remove duplicate values. (optional: you can also adjust the names and make a sort key)

3. Create a new table in Power BI and paste the values into the table.

4. Make connections between country and the newly created country table.

 

cap1.JPGcap2.JPG

 

 

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

 

By my tests with your sample data, it seems that you could create the realtionship for the two tables with country column like below.

 

relationship.PNG

 

If you still need help, could you please share some sample data and your desired output so that we could help further on it?

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I found a solution using a bridging table.

 

Here are the steps

 

1. Export all country tables to excel files

2. Append all countries in 1 column and remove duplicate values. (optional: you can also adjust the names and make a sort key)

3. Create a new table in Power BI and paste the values into the table.

4. Make connections between country and the newly created country table.

 

cap1.JPGcap2.JPG

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.