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

creating relationships

 

 

 

trying to create relationship between two tables. can anyone tell me why its giving me this error and what i need to do to connect it? i am trying to link the corp ae table to corp ae table but its not linking. i know there columns in both that match becasue i checked them but why dosnt it detect it?

 

i cannot have a unique value because my corp ae table has multiple values and i cannot remove it.

 

for example

a          product 1      jan sale 

a          product 1      feb sale

b          product 2     ...

 

Capture.PNG

4 REPLIES 4
ruecj5
Advocate I
Advocate I

To establish a relationship between two tables, the columns have to have a 1:1 or 1:Many relationship with the data they contain.

 

Based on the screen shot, the columns you would like to create a relationship between do not have a 1:1 or 1:Many relatioship.  I can't tell for sure with just 3 rows of data, but it looks like you have a Many:Many (each unique response appears many times in each column) type relationship, which does not work.

 

If you are looking to pull Sales Office/Sales Market from 'Sheet 1' in to 'Category Report' and the list of unique names in column [Corp AE] is the same for both tables, you would need to de-duplicate 'Sheet 1' based on column [Corp AE] so that each unique name in the column only appears one time.  If that is something you are able to do, you can establish a 1:Many relationship between the two tables.

 

- Chris

 

rjunai200
Helper I
Helper I

 

 

 

trying to create relationship between two tables. can anyone tell me why its giving me this error and what i need to do to connect it? i am trying to link the corp ae table to corp ae table but its not linking. i know there columns in both that match becasue i checked them but why dosnt it detect it?

 

Capture.PNG

@ankitpatira is right, it's about the keys.

What I end up doing is concatenating PK and FK as a new column and this column will be the new PK for the connected tables. But things get messy with complex data.

 

Allowing multiple keys relationship which is not supported is the solution, vote for it here if you find it beneficial
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/11428449-allow-database-multiple-...

 

And if you find something easier, let us know.

@rjunai200 Basically you need to consider it as PK FK relations in your database tables. What error means is that in one of your tables there has to be unique values which will be your PK table and other will be FK table.

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.