Forum Discussion

joglidden2's avatar
joglidden2
Icon for Post Patron rankPost Patron
3 years ago

Power BI Issue: Cannot change "Key column"

Has anyone else had this issue? My report wont refresh because 

"Column 'BR_Site' in [Table] contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table..."

 

And yet here, I have changed the "Key column" to the correct and proper PK. It still will not refresh without the same error! Where do I change the PK for the Table?

 

 

Is this just a bug in the latest version of Desktop? Has anyone else seen this issue? If I delete and re-import the table, then I'll lose all my measures & columns. 

 

3 Replies

  • Ok, still not working. Something in PBI Desktop is "sticking" on an old relationship, even though it's been deleted. Data will not refresh. "Column 'ID' in Table 'SITE_BR_view' contains blank values and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table. (ID (2501))." But this relationship is long gone. I hate to have to rebuild this entire report because of this bug. 

    • joglidden2's avatar
      joglidden2
      Icon for Post Patron rankPost Patron

      Ok, latest hack: went in to Transform Data, DELETED the [ID] column that was causing this "ghost" relationship, and that allowed me to refresh the data and republish the report. Not only should I not have to do this, but I have little confidence that this will persist or permanantly solve the issue. 

  • Yep, latest version of PBI appears to have a bug. I deleted the table, reinserted it, repasted all my measures and columns, and it refreshed normally. Someone should get on this. Designating, or redesignating a table/view PK does not appear to work consistently for direct import.