Co-Develop in Power BI Desktop: Creating an NHL Draft
November 2, 2023
In May 2023 Microsoft announced Fabric, an end-to-end, human-centered analytics product that brings together all an organization’s data and analytics in one place. Accompanying the announcement of Fabric are features that improve Power BI’s relationship with Developers. One such feature is the improved co-development experience.
How Are Several Developers Able to Work together in Power BI?
Until these recent announcements, it was difficult for more than one developer to work on reports or datasets in Power BI, and it was easy to overwrite someone else’s changes, resulting in lost work. Furthermore, when searching for a previous version of a report or attempting to re-deploy an accidentally deleted report on the Power BI web portal, you might be out of luck.
Developers use source code repositories (repos), such as Git, to maintain a history of changes to source files, detect how changes affect earlier versions, and recover from disasters, such as accidental deletes. Source code repos are better suited to detecting and resolving conflicting changes from multiple developers. Without this feature, it is easy for one developer to overwrite someone else’s changes without realizing it.
By initializing a Git repo for your dataset and reports you can unlock co-development to save time, isolate change requests, and track those changes among several Power BI authors, allowing them to collaborate more efficiently and safely.
When using a Git repository (as shown above), developers have a local copy (or “branch”) of the repo files, and their changes are committed locally. They can access changes made by others on the remote repo (in Azure DevOps) by pulling them to their local repo and merging them with their changes. Any conflicting changes can be addressed by that developer. Once they are satisfied with their local changes, they can push those changes to the remote repo.
To demonstrate Co Development using Power BI and Azure DevOps I created an NHL Family Draft Report that scrapes the NHL’s website for playoff points and integrates our draft selections to create visuals showing which family member is in the lead on any given day. I also highlight how two developers can continue to work on that same report in harmony.
Save as PBIP and Initialize repo to unlock Co-Development.
I opened my original NHL Family Draft Report (.pbix) file in Power BI Desktop, then enabled the Power BI Project save option, which is currently a Preview feature.
I used VS Code to create a new Git repo in C:\temp\PBI-Devops. Then in Power BI Desktop, with my original PBIX file opened, I selected Save As PBIP (PBI Project file), which created the files and folders shown below.
Above are some files located in the folders. When a Power BI Desktop PBIX file is saved as a PBI Project, the code is now saved in many smaller text files, rather than one binary PBIX file. This improved folder structure makes it much easier to track code changes by comparing text files rather than comparing a single large binary PBIX file.
Co-Develop: Split up the workload, work in harmony.
One family stakeholder (let’s call him Hudson) says “Dad, I need a scatter chart that puts the Sum of Goals on x-axis and Sum of Assists on the y-axis for further analysis. Can you do this now?”
Another asks for the dataset to be updated so the Top Scorer is displayed at any given time.
It would be beneficial to split the tasks and assign one to the report developer (Hudson) and the other to the dataset developer (Dad).
This report is what Dad and Hudson are starting with before they make their changes:
Hudson can now create a branch of the PBI Project source code from the repo to work on the new report request.
Below is the new report visuals that was requested.
And Dad can branch and work on the new dataset request.
After Dad makes his changes in Power BI Desktop, he adds a column named “Calculated Points”, and a measure titled “Top Scorer” in the second section and updates the main visual.
This is what the report contains after Dad’s changes.
Dad finishes his requirement allowing Hudson to merge the change into his own branch so that Dad’s change can be used by Hudson.
After receiving Dad’s changes, Hudson creates another PR with his changes and the report has both completed requests in the main branch – both the dataset change allowing the Top Scorer to be displayed and the new visuals.
Below is the report with both requests completed using co-development.
With the new feature in Power BI Desktop that integrates with source code repositories, you can unlock co-development to save time, isolate change requests, and track those changes among several Power BI authors, allowing them to collaborate more efficiently and safely.
Customized Modern Search Experiences with PnP Search Web Parts November 23, 2023 Today, PnP Search is often used in SharePoint to create customized search pages and result displays. This results…
The Imaginet Difference: An Exclusive Look at Imaginet’s Onboarding Process November 16, 2023 Most new developers are familiar with the dread of “onboarding.” Onboarding refers to the first few weeks…
Let’s build something amazing together
From concept to handoff, we’d love to learn more about what you are working on.
Send us a message below or call us at 1-800-989-6022.