Version Control in Power BI and Fabric

Power BI and Microsoft Fabric use Azure DevOps as the core component for their version and source control. The integration with Azure DevOps and Git helps maintain a copy of the source code and version it. It allows access to it anytime needed, plus the multi-development aspect added. In this article and video, you will learn how this integration works.

Video

Why Source Control?

Source Control and Version Control are the same thing in the context of application development. Whenever you are dealing with a source code or an application that has coding done for it, it is important to be able to keep versions of that code somewhere. The code usually changes constantly with the appearance of new requirements, and developers implement changes to meet the requirements. It is one of the most important tasks to be able to look back in time and see previous versions of source code. This can be to understand the code, troubleshoot it, revert to a workable version, and many other reasons.

For years in the application development industry, many platforms have been created to maintain the source code, called Source Control software or services. Examples of such services are Azure DevOps, Team Foundation Server, Source Safe, Github, etc.

A source control platform provides the ability to create branches from the application’s main thread so that multiple developers can work on branches simultaneously. Then, branches (at specific points in the project timeline) might be merged into the main trunk. Here is an image showing how branches might work. Source is Wikipedia: https://en.wikipedia.org/wiki/Version_control

Azure DevOps

Azure DevOps is a Microsoft product that offers version control, project management, and some features related to maintaining the lifecycle of an application. Azure DevOps uses two version control providers: Git and Team Foundation (TFVC).

The source control technology that Power BI and Fabric support at the time of writing this article is Azure DevOps using Git.

It is essential to have version control ability for Power BI and Microsoft Fabric projects. It ensures that the work done on the Power BI and Fabric items won’t be lost and can be reverted to any version if necessary. For a long time, this was not possible in Power BI. However, the support of source control has been recently added, and not only for Power BI but the foundation is set so that it can be used for Microsoft Fabric work overall. To learn more about Fabric, read my article here.

Azure DevOps itself is much more than just version control. It comes with other aspects of application development, such as task boards, test plans, and pipelines.

Getting Started Sample

Let’s see how you can set up the Microsoft Fabric and Power BI to keep the source code in Azure DevOps.

Azure DevOps Project

The first step is to have an Azure DevOps project. You may also need an Azure DevOps account and license for this. Start by logging into the Azure DevOps, https://dev.azure.com, and then create a new project.

When creating the project, ensure the Version Control is selected as Git. At the time of writing this article, Team Foundation is not supported for integration of Fabric and Azure DevOps.

As this is a new project, it has no files in the Repo yet. And it doesn’t have any main branch either. Go to Repos and create a main branch by clicking on the Initialize.

The DevOps project is now ready to connect to the Power BI or Fabric Workspace.

Workspace Setting

In the Microsoft Fabric or Power BI workspace, navigate to Workspace settings.

Navigate to the Git integration tab. After connecting to the Azure DevOps account, you can choose the Organization, Project, Git Repo, and Branch. And then click on Connect and Sync.

Cross-Geo Git Integration

The connect and sync should work very straightforward. However, if the workspace is in a different region than the DevOps Repo, then you may get this error message:
This workspace is in a different region. Got to the workspace admin settings to enable cross-region connections.

If you get the error above, ask the Power BI (or Fabric) administrator to go to the Admin Portal, and under Tenant Settings, enable the option below for cross-geo Git Integration.

Now, the workspace should be able to connect to Azure DevOps repo even on different regions.

Syncing with Azure DevOps

If the syncing process is done, you should see a screen like the one below.

The above screen shows what items are synced and what are not (please note that at the time of writing this article, some of the Fabric items are not yet supported for Git integration). You can also see the date and time of the last sync at the bottom of the screen and the branch that this is connected to in the repo. There is also a source control button at the top of the page that shows if there have been any changes since the last sync or not.

What items are supported?

At the time of writing this article, the following items are supported;

As this feature is very recent and still in the preview stage, I believe it will soon have other items supported. The last two items appeared only last week in this integration (it is not even on the Microsoft documentation page yet).

Commit Changes

If any Fabric items (those supported for Git integration) have changed since the last sync, you will see a number on the Source control button indicating the number of files that have changed. By clicking the button, you can see the changes and then decide to commit changes for as many items as you want. You can also add a comment when committing the change to the repo.

The changes will then be all saved in the Azure DevOps under Repos.

By clicking on any of the commits in Azure DevOps, you can see the changes on the files.

Or you can change the view to see these two side-by-side

The Process is More Important than Technology

The Git Integration of Power BI and Microsoft Fabric is one of those features in the technology that itself is good to have, but it won’t be much of a help unless it is used in a proper setup or process. To manage the source code properly, you would need a PROCESS, which the developers would follow when they make a change. An example can be creating branches rather than committing to the main branch and then merging the changes into the main branch by another process or someone else in the team. I won’t go that far in this article; It would require another article to review such best practice standards and processes.

Summary: Git Integration for Power BI and Fabric

In Summary, Git Integration with Microsoft Fabric and Power BI enables developers to maintain their source code in an Azure DevOps repository. This enables the development team to version control the code and revert to any version if needed. It also enables multiple developers to work on different branches and merge them. As the feature is very recent, not all Fabric items are supported yet by this, however they soon will be. When using this feature, it is critical to have a process for managing the branches.

Reza Rad on FacebookReza Rad on LinkedinReza Rad on TwitterReza Rad on Youtube
Reza Rad
Trainer, Consultant, Mentor
Reza Rad is a Microsoft Regional Director, an Author, Trainer, Speaker and Consultant. He has a BSc in Computer engineering; he has more than 20 years’ experience in data analysis, BI, databases, programming, and development mostly on Microsoft technologies. He is a Microsoft Data Platform MVP for 12 continuous years (from 2011 till now) for his dedication in Microsoft BI. Reza is an active blogger and co-founder of RADACAD. Reza is also co-founder and co-organizer of Difinity conference in New Zealand, Power BI Summit, and Data Insight Summit.
Reza is author of more than 14 books on Microsoft Business Intelligence, most of these books are published under Power BI category. Among these are books such as Power BI DAX Simplified, Pro Power BI Architecture, Power BI from Rookie to Rock Star, Power Query books series, Row-Level Security in Power BI and etc.
He is an International Speaker in Microsoft Ignite, Microsoft Business Applications Summit, Data Insight Summit, PASS Summit, SQL Saturday and SQL user groups. And He is a Microsoft Certified Trainer.
Reza’s passion is to help you find the best data solution, he is Data enthusiast.
His articles on different aspects of technologies, especially on MS BI, can be found on his blog: https://radacad.com/blog.

2 thoughts on “Version Control in Power BI and Fabric

Leave a Reply