Forum Discussion
Can´t create a relationship between two columns because one of the columns must have unique value
- 10 years ago
KSveigaard basically what that error is complaining about is that relationship you're trying to create from column within 'FROM' table to your column in 'TO' table has issue. one of that column must have unique product numbers. you can't have Many to Many relation but only One to Many or Many to One relation. So ensure that one of the table has unique product numbers and then there won't be any issue.
I was struggling with this and GOOGLE SHEETS.
In PowerBI Data View I would highlight each column header. On the bottom it would say
TABLE: table name (148 rows) COLUMN: column name (22 distinct values)
For BOTH tables it would say 22 distinct values but still it would not create a relationship. Within the data my 1 of *(many) column is created from a query of the * so there should not have been a problem.
I tried adding a NULL into the 1 side of the column to see if that worked. It did not.
Finally within the source data I created a tab solely for the 1 side. It has no other purpose than to conduct the query to create the 1 list. This worked. Putting the data by itself may have had nothing to do with it but when I did this it suddenly was able to create the relationship.
- jweinapple9 years agoFrequent Visitor
ANSWER!!! This is a good response that got me thinking.
If you are still struggling after making this change, MAKE SURE YOU DO NOT HAVE CASE SENSITIVE MATCHES!!!!!!
I was able to find duplicate values such as a cell containing "A_Weid" and "a_weid".
POWER BI READS THESE AS SEPARATE VALUES!!!!