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
brs09j
Helper II
Helper II

Autodetect Relationships

This feature doesn't seem to be working for me. Although, the column names are identical on other tables. I'm wondering if this is due to the error I get when I try to create the relationships manually

 

"You can't create a relationship between these two columns because one of the columns must have unique values."

 

I can right click one of the column and remove duplicates but then I'll potentially lose needed data, right?

 

Thanks.

2 ACCEPTED SOLUTIONS

v-yulgu-msft
Employee
Employee

Hi @brs09j,

 

Basically what the error message is complaining about is that relationship you're trying to create between two tables has an issue. One of that common column must have unique numbers. Only One to Many or One to One relationship are supported. In your scenario, it looks like a Many to Many relationship that might lead to such an error. 

 

To work around the Many to Many problem, please refer to this blog which has provided two workarounds:

 

  • Edit one the query and make the column a distinct list of the key values by using “Remove Duplicate Rows” on it. 
  • Add an intermediary table made of the list of distinct key values to the model, which will then be linked to both original columns

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yulgu-msft
Employee
Employee

Hi @brs09j,

 

Basically what the error message is complaining about is that relationship you're trying to create between two tables has an issue. One of that common column must have unique numbers. Only One to Many or One to One relationship are supported. In your scenario, it looks like a Many to Many relationship that might lead to such an error. 

 

To work around the Many to Many problem, please refer to this blog which has provided two workarounds:

 

  • Edit one the query and make the column a distinct list of the key values by using “Remove Duplicate Rows” on it. 
  • Add an intermediary table made of the list of distinct key values to the model, which will then be linked to both original columns

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes, this would be the cause. Have a read of my article here to help you understand what you need. https://exceleratorbi.com.au/the-optimal-shape-for-power-pivot-data/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

@MattAllington

 

The website won't load for me.

@MattAllington

 

It's loading now.

Hi @brs09j,

 

Have you resolved the problem now? If so, would you please kindly mark the corresponding reply as an answer or sharing your resolution so that it can benefit more users? If you still have any question, please feel free to ask.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.