restlessmodem
restlessmodem

Reputation: 448

Rename columns in dataset without breaking existing reports

We have come to the situation of wanting to rename some columns in our PowerBI 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 in the PowerBI service that have been created based on the dataset.

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?

Thanks for any help!

Upvotes: 1

Views: 1167

Answers (2)

restlessmodem
restlessmodem

Reputation: 448

We found a solution to this, while it might not be a straightforward process, it allows to programmatically alter reports and fix them in JSON format. The command line toolset pbi-tools allows to decompile and recompile reports like

pbi-tools extract reportfile.pbix
pbi-tools compile reportfolder

and create a series of editable JSON files. In our tests it was even possible to substitute a data model with this approach. Also this is useful for version control of reports.

Credit to AlexisOlson on the PowerBI forum.

Upvotes: 1

David Browne - Microsoft
David Browne - Microsoft

Reputation: 89316

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.

The only general solution to breaking changes in a shared Dataset is to introduce a new version, and keep both for a period of time.

For this specific change, you could introduce a new Perspective in the model (using Tabular Editor) which new reports could choose.

Another option if the Dataset is large, and you don't introduce any structural changes, is to have one model reference the other model using DirectQuery, which is currently a preview feature.

Upvotes: 0

Related Questions