cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Veles Member
Member

Keep getting unique values error when making a relationship

Hi all,

 

I've been trying to create a relationship between two tables and keep getting the "You can't create a relationship between these two columns because one of the columns must have unique values." error.

 

I've removed all duplicate values and using a table visual for my lookup list, there are no IDs with a count greater than 1. I've even made a table using =values method and then linked the two together and still get my error.

2 REPLIES 2
xuri Frequent Visitor
Frequent Visitor

Re: Keep getting unique values error when making a relationship

Hi,

I think there is another way to prove if the values are actually unique or the view in Power BI makes you believe: go to the "Data" view (where you can see the content of your tables) and "Copy Table" via right click on the table you want to prove. Then open an empty Excel file and paste what you have copied. In Excel you can check duplicates with a marking condition. Do this separately for both tables.

What you can also do is to create a table and create a relationship to both tables.

DISTINCT('YourTableName'[YourColumnName])


I hope this is a help for you.

Community Support Team
Community Support Team

Re: Keep getting unique values error when making a relationship

Hi @Veles,

 

I think your tables may contains duplicate records(duplicate records include blank records). For you scenario, you can merge key columns of these tables and use distinct function to remove duplicate records. Then create relationships between this table and above tables.

 

Sample:

New Table= DISTINCT(UNION(ALL(TableA[Column]),ALL(TableB[Column])))

 

In addtion, you can also try to remove these duplicate records in power query.

 

Regards,

Xiaoxin Sheng

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



For learning resources/Release notes, please visit: | |

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 123 members 1,681 guests