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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Veles
Advocate V
Advocate V

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
Anonymous
Not applicable

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

xuri
Frequent Visitor

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.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.