In this writing, I like to share how I learn to create a project in Azure DevOps in order to version control Power BI files, and in order to understand why saving a PBIX file as a PBIP file is providing crucial benefits for Power BI developers when version controlling.
With a pbix file alone, one of the ways to version control it is by storing it in a SharePoint folder. And then we could know when the file was changed. Also, we could go back to the previous version if it is needed. However, it is hard to know what was changed and why it was changed.
Another way to version control is by using Azure DevOps and Visual Studio Code. In this case, we can give a name or a title to each change in order to provide information on what was changed and why it was changed.
Firstly, I will briefly share how to start using Azure DevOps for Power BI version control with a PBIX file.
And then, secondly, I will share what is the advantage when a PBIX file is saved as a PBIP file.
Let's start to create an Azure DevOps project.
Before starting, we need below.
Prerequisites in Azure portal and Power BI Workspace -> This is to create a Release flows and Pipelines in Azure DevOps in order to publish reports from Azure DevOps to Power BI Workspace. If you are publishing reports by clicking the publish button in the desktop file, the below prerequisite steps are needed later.
Create a new app registration in Azure Portal ( portal.azure.com )
App Registration in Azure Active Directory
New client secret in Azure Active Directory -> App Registration -> click the created Application name
Power BI Tenant setting
Admin portal -> Tenant settings -> Developer settings -> Allow service principals to use Power BI APIs
Power BI Workspace setting
Assign the security group as Admin to the workspace
Now, let's go to Azure DevOps to create a project.
Dev.Azure.COM
In Visual Studio Code, the Azure DevOps project name (jihwan_kim) is under the local computer's folder name. And this means that under the Azure DevOps Test folder on my computer, there is a sub-folder created named jihwan_kim.
In the sub-folder (jihwan_kim), I can add a sample pbix file into the folder, and then Visual Studio Code detects the changes in the folder. And it shows like below.
I commit the change like below.
I named the below commit as "Step one".
Create a new branch, and I named it "Main-branch". And then, publish the branch to Azure DevOps.
In Azure DevOps, you can check the changes shown in the below screenshot.
When opening the actual PBIX file, I found out that one DAX measure has to be fixed.
After fixing the measure, and after saving the pbix file, Visual Studio Code detects the changes. I commit the changes by naming this process as "Fixing Dax Measure" (Second picture below). And then I synchronize it.
In Azure DevOps, the change is recorded and you can check the changes below.
Click the last commit "Fixing DAX measure", and then the below is shown. This provides the files (before the change and after the change) to download.
Now, let's create a PBIP file in the same folder. Once you save the pbix file as pbip file, the Visual Studio Code detects the changes in the folder, and it shows below.
The changes in the folder are shown and I will name it as "save as pbip", and commit. And then I will synchronize the changes.
And then, you will start to see some changes in Azure DevOps. It is totally different than when I only used pbix file.
Now, in pbix file, I try to change the measure like below.
Save it.
And then, save it as pbip file.
And Visual Studio Code shows what has been changed.
Commit the change by naming this as "change ALL to REMOVEFILTERS" and synchronize it.
In Azure DevOps, when clicking the name of the commit, you will see what has been changed.
Now, all the changes can be shown with the name of the commit and what has been changed.
I hope this helps to have more fun playing with Azure DevOps and PBIP.
Comments