Forum Discussion
Rename columns in dataset without breaking all deployed reports
- 4 years ago
This should be possible with pbi-tools.
TL;DR from here https://data-goblins.com/power-bi/replace-report-measures
-
Download pbi-tools desktop CLI and make sure it’s in your path env variables
-
Decompile your .pbix using pbi-tools extract, referring to the pbix path
-
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.
-
Recompile your .pbix using pbi-tools compile, referring to the path of the pbix output folder
-
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.
-
This should be possible with pbi-tools.
TL;DR from here https://data-goblins.com/power-bi/replace-report-measures
Download pbi-tools desktop CLI and make sure it’s in your path env variables
Decompile your .pbix using pbi-tools extract, referring to the pbix path
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.
Recompile your .pbix using pbi-tools compile, referring to the path of the pbix output folder
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!