So version control in Power BI has been a challenge from the start. What do you do if the changes you made messed everything up and you want to roll back to an older version? Or if the file you saved on your computer is (unintentionally) deleted? What if parts of the changes you made where really good and you would like to update other reports with the same changes? Then what?
No built-in solution for this exists in Power BI today. If you have a Premium licence, deployment pipelines are an option. The Deployment Pipelines will help you get better control of your data, and provide an overview of the differences between the content in workspaces. However, it is not solving all the challenges we have mentioned above. I have written an article about that feature here:
We are still missing source control! This is a feature many wished for from the Power BI team. The idea has been voted on at ideas.powerbi.com. In March 2022 an administrator updated the idea to: We are working on this item but no timeline can be shared yet. We appreciate your patience
So, while we wait for this new feature to come, let’s take a look at your options!

Version control your .pbix files using OneDrive or Sharepoint
The .pbix file is a binary file. That means that it is not possible to track changes. So, what can we do?

OneDrive and Sharepoint contain built in solution for version control witch means that you can get access to a previous versions.


Pros:
- Easy to start using!
Cons:
- You have to make all changes in Power BI Desktop in order to get the version history. This means that you are losing some flexibility of Power BI Service.
- As you are working with the binary file you cannot:
- Do diffs or schema compares of the versions
- Cannot merge the files or have multiple developers working at the same time
Considerations:
- Make sure that there is a process in place so that all developers that collaborate on the same reports use the same OneDrive/Sharepoint folder.
Version control your .pbix files using Git
You could also use GitHub or Azure DevOps to store your file and track the version of your .pbix file by committing the file to git after making changes as you would with other files in Git.

Pros:
- Could be incorporated into existing development process using git
Cons:
- Same as for using OneDrive or Sharepoint folder:
- You have to make all changes in Power BI Desktop in order to get the version history. This means that you are losing some flexibility of Power BI Service.
- As you are working with the binary file you cannot:
- Do diffs or schema compares of the versions
- Cannot merge the files or have multiple developers working at the same time
Considerations:
- As always it is important to keep in mind the development process for developing Power BI reports. You need to make sure all the developers use this setup for it to work.
- Also consider using large file storage for git. Read more on that topic here: https://git-lfs.com/
Marc Lelijveld has written an article on how you can automate this process using Azure DevOps: https://data-marc.com/2021/06/04/integrate-power-bi-deployment-pipelines-with-azure-devops/
Tabular editor to source control your Power BI data model
When taking advantage of external tools like Tabular Editor, you can save your file as a .bim file.

Before we look into the .bim file, we need to take a quick look at how a Power BI Report is built up. It is divided into two components: Report and Dataset

The Dataset is the data model that holds your data and the changes you have made to it as transformations or measures.
The Report contain all the report pages and visualizations you have set up. It is the visual part of your Power BI report. All of the visualizations in a report come from a single dataset.
The fact that you can differentiate these two affect how you can enable source control in Power BI.
A .bim file is essentially the metadata of your Power BI datamodel. As this is a json file it works well with source control. We can then use this file to track changes in our Power BI Datamodel.
Pros:
- Possible to track changes made to your datamodel.
Cons:
- We are missing tracking on the visual part of your report. For instance if you make some changes to your visuals or report pages, that is not part of the .bim file.
- Extraction of the .bim file requires an external tool and a manual step to your process.
Considerations:
- To automate this you need to take advantage of the XMLA endpoint. However, this requires premium capacity or a premium per-user license.
- You cannot deploy these changes back into Power BI Desktop. If you have a premium lisence you could use tools like ALM Toolkit to deploy changes to the XMLA endpoint.
Gerhard Brueckl has written an article on how you can automate some of the manual steps in this article: https://blog.gbrueckl.at/2022/02/automating-the-extraction-of-bim-metadata-from-pbix-files-using-ci-cd-pipelines/
Useful links:
Leave a Reply