Forum Discussion
change primary key power bi
I want to change the primary key column to another column, because i applied an unpivot on my table and primary key has became not primary with duplicated values, and i need a colomn with identified values like Index, is it clearer?
That is the problem who appears
- odanovich9 years agoFrequent Visitor
I'm receiving this same error... I made edits to my query and now I cant change the data model to resolve it because the data model is waiting for the query changes to be applied... but those cant be changed due to the error that the column is considered the Primary Key of the table....
- odanovich9 years agoFrequent Visitor
To get around this issue, I added a Step in my Query to remove duplicates on the particular column... this allowed me to successfully apply the query. Then I loaded the data model, deleted the relationship. Next I went back in and removed my Query Step: Removed Duplicate to bring back to the original table and now I am reapplying the proper relationship. Phew! Problem solved. :)
- ImaDAXman9 years agoFrequent Visitor
It is likely because of the cardinality of your table relationship. Try changing either from Many:One to One:Many (or vice versa).
Also, make sure the cross filter direction is set to single instead of both. The direction should be Dim > Fact.