Forum Discussion

restlessmodem's avatar
restlessmodem
Frequent Visitor
4 years ago
Solved

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. Howe...
  • AlexisOlson's avatar
    4 years ago

    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.