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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.