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

Can´t create a relationship between two columns because one of the columns must have unique value

I know that in order to make relationships work, you have to have a lookup table and a data table.

I have created a lookup table (lokationsmatch) and removed duplicates both in Excel where the lookup table is imported from, but also in the Query editor, just to be shure. The data type in both tables is "text".

I have tried to check with count.if in Excel and i only have unique values in this lookup table.

 

However i keep getting this error message. 

I can't see what i am missing?

 

I have searched for a solution, but i have only found the "obvious" solutions where users don't have unique values in the lookup table.

 

Have anybody experienced something like it or have some input - it is driving me crazy 🙂 

 

Thanks in advance.

 

Udklip.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found the solution.

I data view i saw that i had 1017 rows but only 1016 distinct values.

I turned out to be two names that were identical, but one had an extra space at the end.

 

I wonder why this is not removed when i remove duplicates if PB is aware that the values are in fact the same?

In Excel these two will be seen as two unique values in a lookup situation - why is this not the case in PBI?

 

Udklip2.PNG

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

I found the solution.

I data view i saw that i had 1017 rows but only 1016 distinct values.

I turned out to be two names that were identical, but one had an extra space at the end.

 

I wonder why this is not removed when i remove duplicates if PB is aware that the values are in fact the same?

In Excel these two will be seen as two unique values in a lookup situation - why is this not the case in PBI?

 

Udklip2.PNG

Anonymous
Not applicable

By the way i have also removed blanks, errors and nulls and i still get this message.

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.