简体   繁体   中英

Use binary data column to create relationship in Power BI desktop

I have imported 2 tables from SQL Server to Power BI desktop in which each table contain one column having binary data. And these columns are used to create the relationship between that two tables. When I proceed to create the relationship in Power BI these columns are not visible. I also tried the conversion of that binary column to text and try to create the relationship but it shows an error: Can´t create a relationship between two columns because one of the columns must have the unique value . How can I create the relationship in Power BI desktop using Binary data columns?

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

This is your issue. One end of the relationship must have a distinct set of values.

Once you converted binary to text you would have been able to create the relationship if you had a distinct set on one side.

This isn't to do with binary being converted to text.

As TDP stated, there has to be duplicate values, whether or not it is through an error in your data source. Please review the query editor and enable viewing column distribution and check to see if there are duplicate values in either of the columns you wish to use.

You will either need to modify your data source or make the changes within query editor directly to remove these duplicates.

It should not matter what data type you are using (binary/text) if there are duplicates. You will not be able to stop duplicates occurring just by changing the datatype.

EDIT: Oops, old thread. The answer still applies, please remove if unnecessary.

例子

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM