Forum Discussion
PowerBI changes my dataverse column names
This feature actually created a huge issue for me that almost caused me to lose a massive and critical Power BI file. Backups would have restored it, but I would have lost a few hours of work. Details here:
Basically, this renaming feature interfered with my primary key in a table. I renamed the column name then something happened with this feature (IDK if it was suddenly rolled out to our environment or what, but it wasn't an issue and then it was) and the key column was automatically renamed to the Dataverse name. My old relationship still existed, but it pointed to a column that didn't exist so Power BI was acting weird. I went into the Power Query Editor, made a copy of my primary key column but renamed it to the default dataverse name, reloaded and made a new relationship. It worked, but Power BI was acting buggy. So I saved the file and reopen -- two relationships exist between two tables; auto-close.
At runtime, it LOOKED like there was one column with one relationship, but it was two columns with the same name (or same display name at least) each with their own relationship to the same table.
It's easy to reproduce:
let
Source = CommonDataService.Database("ENVRIONMENT.crm.dynamics.com"),
dbo_connection = Source{[Schema="dbo",Item="contact"]}[Data],
#"Removed Other Columns" = Table.SelectColumns(dbo_connection,{"contactid", "fullname"})
in
#"Removed Other Columns"
Power Query Editor does not match the loaded and displayed Field Names. This is a huge issue.
Suppose I'm editing the visuals, and delete or rename "Full Name" to "Employee Name"... that inserts a transform step in Power Query, and that breaks because "Full Name" isn't a valid column name. Now I can't refresh the dataset.
Or it would also be easy to do what I did to break the file entirely:
1) Make a relationship to another table with the Contact field.
2) Open Power Query Editor, duplicate the contactid column and rename it to Contact.
3) Make another relationship to the other table.
4) Save the file and be unable to open it.