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
sunjin122
Helper I
Helper I

How to create relationship between two tables?

 

Can anyone help me with this situation? As the screenshot shown below, how can i fix this problem and create a relationship between the two tables? Thanks ahead!

 

Capture.PNG

 

1 ACCEPTED SOLUTION

@sunjin122 The "one" side of the relationship needs to have only 1 unique value in the column you are using.

example: Relationship on Client between table "Many" and "One"

  Works  
Many  One 
ClientProduct Client 
1A 1Name 1
1A 2Name 2
1S 3Name 3
2S 4Name 4
2S 5Name 5
     
     
  Will Not Work  
Many  One 
ClientProduct Client 
1A 1Name 1
1A 2Name 2
1S 3Name 3
2S 4Name 4
2S 4Name 4

 


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

5 REPLIES 5

@sunjin122 The "one" side of the relationship needs to have only 1 unique value in the column you are using.

example: Relationship on Client between table "Many" and "One"

  Works  
Many  One 
ClientProduct Client 
1A 1Name 1
1A 2Name 2
1S 3Name 3
2S 4Name 4
2S 5Name 5
     
     
  Will Not Work  
Many  One 
ClientProduct Client 
1A 1Name 1
1A 2Name 2
1S 3Name 3
2S 4Name 4
2S 4Name 4

 


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Thank u for your explanationSmiley Happy

KGrice
Memorable Member
Memorable Member

From the error message, neither table has a column of unique values to create your relationship, at least not on the column you're using to relate them. What kind of tables are you trying to relate? I only ask because it does not always make sense to try to create this relationship. However, if you have a real need for a many-to-many relationship, this article gives an in-depth description of how to make this happen using a bridge table.

jahida
Impactful Individual
Impactful Individual

Need more context, what do the tables contain?

Thank you for your reply

 

Capture2.PNG

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.