Forum Discussion
Cannot create relationships
- Anonymous9 years ago
Hi hidenseek9,
When creating relationship using your sample data, I get the following error message, as the message mentions, one of the columns you use to create relationship must have unique values.
In your scenario, you can remove duplicates(20191666) in your MasterFile as shown in the following screenshot, then create replication between the two tables.
If you want to reserve duplicates in MasterFile, please create another new table using the following DAX(replace table name with your own), then create relationship between the new table and MasterFile, and create relationship between the new table and actual data file.
NewTable = FILTER( DISTINCT( UNION( DISTINCT(Sheet2[#]), DISTINCT(Sheet3[Vendor]) ) ), NOT(ISBLANK(Sheet2[#])) )
Thanks,
Lydia Zhang - Anonymous9 years ago
Hi hidenseek9,
Do you use the "Remove Duplicates" option I mentioned in the second screenshot to remove duplicates? If so, you should be able to create relationship between original tables. "Remove Duplicates" option is available in Query Editor of Power BI Desktop.
Thanks,
Lydia Zhang
Hi Phil_Seamark
Thanks for a quick response.
The error message says,
cannot create a relationships with these two columns due to unmatched value in either column
I am translating my original language in English, but it says something along above line.
Do you know how to solve this?
Thanks,
H