Forum Discussion
change primary key power bi
In Query Editor:
1. Do your Unpivoting work.
2. Add Column; Index Column; From 0 or 1. Call it Index.
3. Create a copy of the column that the editor thinks is your primary key. Call it "Primary - Copy".
4. Delete the column that the editor thinks is your primary key (so delete "Primary" column in this example.) This will force the editor to assume a different primary key. It will choose the Index column as your new primary key.
5. Apply your changes.
6. Go back and rename the "Primary - Copy" to its orignial name.
- CarlosCuenca7 years agoNew Member
It works but instead of duplicate the column I deleted it, created the index column, refresh the model and them erase the step of deleting. All in the Query Editor.
- WIshnowsky2 years agoFrequent Visitor
I had this same issue, and already had an index column. Deleting, applying changes then removing the delete step and applying changes worked for me as well.
- Anonymous6 years agoNot applicable
I was having the same issue and this worked! Thank you!