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.

Data load wrongly identifies foreign key relationship. Repro files available.

I have found a case where Power BI Desktop fails to correctly identify the one and only foreign key relationship in a very simple database containing only one "child" table and a related "parent" table. Instead of using the correct foreign key column in the "child" table, Power BI Desktop creates an incorrect relationship using another column.

 

I would like to submit a zip file contiaining the reproduction of this error. It includes a backup of the sample source database, a script for that database, and the PBIX file created by Power BI Desktop (February 2019 version), with the incorrect relationship.

 

Please let me know how I can submit that information to you. Thanks.

 

William Schmidt

wschmidt@stratag.com

Status: Accepted
Comments
v-qiuyu-msft
Community Support

Hi @Anonymous,

 

I got below information: 

 

"This issues is caused because the customer has a binary column in his data source. Powerbi does not support binary columns as of now and they get dropped. 

Workaround:
When the customer is connecting to the source to load the model, select edit in the queries navigator dialog and delete the binary column (In this case: wh_RowVersion in warehouse.Child table). Then click close and apply to load the data.
The right relationship will be created.

We do not have a fixed ETA for this yet."

 

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable

Hi Qiuyun,

 

I just now read your message above and I am very confused. Can somebody explain further why the existence of a timestamp column (which I guess is the binary column being referred to) in a child or parent table would keep Power BI from being able to correctly detect a foreign key relationship between the child table and its parent?

 

All the primary and foreign keys are straightforward BIGINT columns. They are not themselves binary columns. So even if a binary timestamp column is dropped by Power BI, why shoudl this foul everything else up?

 

Also, whoever provided the information to you did not explain why an earlier version of Power BI did not have this error, while a later version did. I documented which earlier version does not have the bug, and which later versions do.

 

I would like to ask that the answer be clarified to address these points if possible. Thanks.