Introducing the New Power BI Project, and why it is important

With so much recent news related to the Microsoft analytics data platform in the past few weeks, the fanfare over a vitally important announcement might have been lost in all the noise. The June 2023 Power BI Desktop release includes a new preview feature that allows you to save your Power BI Desktop files in a new format; and believe me, folks this is a serious game-changer!

Back in December, I posted this short article about how Power BI can participate in Continuous Integration & Continuous Deployment (CI/CD), from simplified code sharing and version control all the way up to fully-automated Build automation & deployment scenarios. However, since the product inception, there have been significant challenges in orchestrating versioning and code sharing with a single PBIX file. Achieving DevOps and CI/CD was possible but it required creative work-arounds and manual steps. In April of this year, Nathan Hales contributed this post, showing how to use Tabular Editor to manually decompose a PBIX file into a Model.bim and then create a Git repo and Azure DevOps project.

Although the essential pattern is the same, the need for manual steps and work-arounds is eliminated with this new feature release!

Power BI Projects and Git Integration

The new feature set consists of three related capabilities, that you can use independently or all together. These are:

  1. Data models and reports defined as separate objects, stored as text files and folders
  2. Native Git integration in a local file system repository
  3. Git integration and file synchronization for a published workspace

Depending on the simplicity or complexity of your needs, you can take advantage of just some or all of these capabilities, based on the level of IT project sophistication within your organization. You can start with managing project files in a local code repository and then graduate to a full-scale DevOps solution with automated Build pipelines.

New PBIP project storage format

Everything starts with a new option in Power BI Desktop, to store as “Power BI project files”. When you select this option, you will be prompted for a folder location.

Rather than a single PBIX file containing a “black box”, all the object definitions are now stored in a series of files, organized in either the “Dataset” or “Report” folders. The Dataset folder contains all the data model components, and the Report folder contains the report, pages and report visuals information. Each file contains clear text that can be edited with a standard text editor like Notepad++ or VS Code. Most definition files are stored in JSON format.

Here are the Dataset and Report folder contents for a sample project I created with Desktop:

The following image shows the Model.bim file which includes the entire data model object collection with all of its properties and settings. This is the same definition standard used by Visual Studio and Tabular Editor to create SSAS Tabular models. These object definition files contain no data – so they are lightweight and portable. But, a copy of the PBIX file is also included in the project root folder, and Power BI keeps all these files synchronized. For example, any changes made to the Model.nim file will be applied to the PBIX file and vice versa.

The Model.bim file can be lengthy and verbose. The simple model I created produces over 33 thousand lines in this file. In the near future, this large file will be replaced by a collection of smaller files in the new TMDL format, used to store individual objects within the data model.

Report objects are described in a similar fashion in respective JSON files. The following example of a Report.json file shows images and themes used in the report design. The JSON format is readable and intuitive.

Git integration for a local repository

By default, the project root folder for a Power BI project is ready to be converted to a local Git repository (commonly called a “repo”). Using GitHub Desktop or any GitHub client editor, simply define a new repository and point to the project folder. Behind the scenes, this registers the repo and adds some hidden files. The repo can then be cloned and branched to synchronize with an online project repository. The following image shows the repo I created for the new sample project, in my web browser at Github.com.

This is just the tip of the iceberg. Using a shared Git repository, different developers can now manage the data model and report separately. They can check-out and branch versions of a dataset or report, make separate edits, compare changes, and then merge them back into a single branch. This has been virtually impossible with a PBIX file and now it should work like most any application development project, with separate code modules and classes. The interdependencies between named objects doesn’t change and will always be part of the wonderful complexities of a BI solution, but it should be much easier to manage then before. Object comparison and change-merging tools like ALM Toolkit should just continue to work, using the XMLA endpoint and local Power BI Desktop instances, just like before.

If you work in an IT pro environment, this is the first step toward managing all your BI data model and report projects in a standardized environment, all ready for true DevOps integration and automated build and deployments. But, if you just work in a small, informal environment where maybe you and a few other people handle all the Power BI work, this capability helps you keep you project source files in one place where you can pick them up in a few months. In the event that another developer needs to take over, or pick-up the project after the win the lottery; they will know where to find the latest version and still have the ability to roll-back changes with no confusion.

The next level of integration, which I will cover in a later post, enables you to integrate a workspace with an Azure DevOps project. This allows you to automate the Build process for a Git repo that you create from a Power BI project, with Build and deployment pipelines managed in Azure DevOps.

The enterprise Business Intelligence and IT community have been anxiously awaiting this capability for many years and it has finally arrived – at least in Preview form for testing and prototyping real Power BI CI/CD DevOps solutions.

Enable the Preview feature

To get started, make sure you have the June 2023 edition of Power BI Desktop installed from the Microsoft Store. Enable the Power BI Project (.pbip) save option on the Options dialog and then restart Power BI Desktop.

Paul Turley

Paul Turley

Microsoft Data Platform MVP, Principal Consultant for 3Cloud Solutions Specializing in Business Intelligence, SQL Server solutions, Power BI, Analysis Services & Reporting Services.

7 thoughts on “Introducing the New Power BI Project, and why it is important

  1. This feature is a must if MS wish to remain competitive against Google Looker, where this repository based approach is a default.

  2. Been looking for something like this for some time. I remember this coming up years ago as we were trying to figure out how best to version the PBI files as we were making changes and trying things out as well as trying to share those code changes locally on the network. There was never a good solution to the problem then. This looks very promising.

Leave a Reply

Discover more from Paul Turley's SQL Server BI Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading