Using the Power BI Git Integration: A 6-Step Guide

Using the Power BI Git Integration: A 6-Step Guide

In my last post, I discussed the long-awaited Git integration feature for Power BI, which is  part of MS Fabric, and highlighted its collaboration benefits. 

  

To recap, this is how the integration helps with source-control: 

  

  • Creating reporting and dataset files using Power BI Desktop, which are compatible with source control. 
  • Saving your work as a Power BI project (.PBIP) in a folder instead of a .PBIX file. 
  • Collaborating with multiple developers, tracking versions, comparing revisions, and reverting to old versions using source control integration. 
  • Implementing CI/CD (Continuous Integration/Continuous Deployment) to ensure quality before deploying to production environments. 
  • Performing code reviews, automated testing, and automated builds to ensure deployment integrity. 
  • Using Git integration and deployment pipelines to manage full application lifecycles in development, testing, and production workspaces. This can be done through the UI or automation tools like Azure Pipelines. 

  

Now, let's discuss how to use this feature in our work as Power BI developers. Here is a 6-step guide to getting started: 

(Note: The below photos are courtesy of Microsofts PBI Blog.)

 

[ 1 ] Activate the Git integration feature by going to File > Options and settings > Options > Preview and checking the box next to “Power BI Project (.pbip) save option”. 

Es wurde kein Alt-Text für dieses Bild angegeben.
Activating the preview


[ 2 ] Create a report (it doesn't have to be finished), and instead of saving your file as a .PBIX or .PBIT, save it as a .PBIP. 

Es wurde kein Alt-Text für dieses Bild angegeben.
Saving as .PBIB


[ 3 ] This will create a structured folder containing all the necessary Power BI project files in a Git-friendly format. To work with Git, initialize a local branch with the .PBIP project folder inside. Personally, I like to use VS Code for its speed and simplicity, but you could also use tools like Visual Studio or the Git CLI. Whatever floats your boat. 

Es wurde kein Alt-Text für dieses Bild angegeben.
Initializing your repository


[ 4 ] Continue developing your report and the underlying data model. After making changes, connect your local repository to a remote branch. Note that GitHub is not yet supported, so you'll need to rely on Azure Repos. 

Es wurde kein Alt-Text für dieses Bild angegeben.
Connecting your local repository to an Azure repo


[ 5 ] Publish your local branch to Azure Repos, providing a new way to publish your work to Power BI Service. Previously, reports were published directly from Power BI Desktop to workspaces. With Git Integration, you can now load reports and data models from a connected remote branch.   

Es wurde kein Alt-Text für dieses Bild angegeben.
Setting up the workspace for the Git integration


[ 6 ] When loading data models this way, they will not contain any data because only the metadata is saved in Git. However, you can simply refresh the dataset to retrieve the final data. If you make changes to the report in the Power BI Service, you can write back the changes to your remote branch and sync them to your local machine's branch.  

Es wurde kein Alt-Text für dieses Bild angegeben.
Source control in MS Fabric (formerly Power BI Service)


Voila, just like this, by utilizing the upcoming Git integration in Power BI, asynchronously developed reports will belong to the past. If you have any questions, be sure to leave them below or just message me directly.  

Es wurde kein Alt-Text für dieses Bild angegeben.
Git integration architecture

 

#DataAnalytics #DataReporting #MicrosoftFabric 

Hi Semih Volkert, I am facing issue with a particular case. I have a report based on a dataset (lets call the dataset as 'A'). Now I am creating a new report based on dataset A, by connecting to the dataset published in workspace (same workspace where I am doing git integration). Once I save the new report as a PBi project and try to bring it in to my workspace, I am getting an error as in the attached snip. What am I missing here?

  • No alternative text description for this image
Like
Reply

Thanks Semih for the article !! I am working on a Large dataset and as a Developer role i dont have edit access to DataModel. When I follow the same 6 steps everything works fine except when i try sync my workspace with git i am getting "Workload Error Code Git_InvalidResponseFromWorkload". However for other models it is working fine. Have you tested the Git Integration with large datasets. Kindly suggest. Regards, Asif

Like
Reply

To view or add a comment, sign in

Others also viewed

Explore content categories