Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
restlessmodem
Frequent Visitor

Rename columns in dataset without breaking all deployed reports

Hey everyone,

 

we have come to the situation of wanting to rename some columns in our reports for clarity reasons and also replace some raw numbers with measures, so we can add logic to them. However renaming fields breaks the visuals in reports based on the dataset created in the PowerBI service.

 

Fixing all the visuals by hand is absolutly not feasible for us, as we have hundereds of reports with dozens of visuals each, over multiple datasets. Is there any way to solve this, maybe edit the deployed reports programmatically somehow or are we just stuck with the field naming and layout we chose forever now?

 

Thanks for any help!

restlessmodem

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

This should be possible with pbi-tools.

 

TL;DR from here https://data-goblins.com/power-bi/replace-report-measures

 

  1. Download pbi-tools desktop CLI and make sure it’s in your path env variables

  2. Decompile your .pbix using pbi-tools extract, referring to the pbix path

  3. In the pbi-tools output, either programmatically or manually replace the field & table references in the broken visuals .json files. For each visual, you must loop through the key/value pairs that refer to tables, fields, or both.

  4. Recompile your .pbix using pbi-tools compile, referring to the path of the pbix output folder

  5. Reopen your .pbix file to confirm that the changes are done.
    You may need to do some testing if you have complex visuals with a lot of formatting, to make sure you cover the necessary keys and don’t mistakenly replace other text that you didn’t intend.

View solution in original post

5 REPLIES 5
Kevin-Warne
Regular Visitor

Have come across exactly this problem. If you create a column with exactly the same spec as the one to be renamed, but give it the new name you won't break any reports. Then in the cloud you will still have to manually replace the old one (where it is used) with the new one - a manual but safe process!

AlexisOlson
Super User
Super User

This should be possible with pbi-tools.

 

TL;DR from here https://data-goblins.com/power-bi/replace-report-measures

 

  1. Download pbi-tools desktop CLI and make sure it’s in your path env variables

  2. Decompile your .pbix using pbi-tools extract, referring to the pbix path

  3. In the pbi-tools output, either programmatically or manually replace the field & table references in the broken visuals .json files. For each visual, you must loop through the key/value pairs that refer to tables, fields, or both.

  4. Recompile your .pbix using pbi-tools compile, referring to the path of the pbix output folder

  5. Reopen your .pbix file to confirm that the changes are done.
    You may need to do some testing if you have complex visuals with a lot of formatting, to make sure you cover the necessary keys and don’t mistakenly replace other text that you didn’t intend.

We have reviewed the tool and while this will of course not be a simple process, this is exactly what we were looking for as an approach to programmatically alter reports. Thank you!

Awesome! Thank you, this looks very promising! I will try it out and update back here shortly with our findings.

Greg_Deckler
Super User
Super User

@restlessmodem Well, on a go forward basis you could rename the display names of the columns/measures in new reports in the Visualizations pane. But, if you are trying to rename the columns in the base dataset itself then that is going to break visualizations and I am not aware of a way around that. It's basically the same if somebody changes a column name in a source data system. There will be downstream impacts where this breaks queries, etc. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.