Thursday 7 March 2024

Power BI report sample - GIT integration

 I had not been in touch with Power BI too much with most focus on Azure. But recently I decided to explore what had changed during the time I lost touch. The Power BI community is vibrant and keeps adding new features every month and for sure so much has changed!

The feature I liked the most was git integration. I decided to try it out with a report I had created from Wikipedia data - an animated visual for automotive trends in Japan.

Here is a snapshot of the report.


I wanted to see how I could achieve git integration and so, I opened the .pbix file and did the following.

This is still a preview feature, so from Power BI Desktop > File > Options and settings > Options > Preview features, I selected the checkbox for the Power BI Project (.pbip) save option.

























I clicked ok and saved the report as a .pbip file instead of the .pbix.
The moment I do that, I notice the following files created in the designated folder location -



Notice the .gitignore file!

Next, I use the "open with" menu option to open the folder with VS Code, like below.


Then after this is open I VS Code, I initialize a new repo.


This shows me all these files now!


Once I had reviewed the files, I synched the changes to my remote Github repository.



On my remote branch!


I also enabled VS Code to periodically run "git fetch".
Now, let me see how changes to the local PBIX file get tracked and how I can synch any changes to my remote git branch!

I make a very simple change, adding a "The" to the report title!










And immediately in my open VS Code editor, I see that the changes have been tracked!


Details below:

I can see side-by-side the exact change I made to the title!






No surprises for me, so I go ahead, stage, and commit the changes to synch with the remote git branch!

And sure enough, I can see the changes in remote as well.


So, all in all, a fantastic feature that I am sure most of you would like!










No comments:

Post a Comment