Skip to main content

Power BI

Needs Votes

Built in Git support in PowerBI Desktop

Vote (2125) Share
Matt Smith's profile image

Matt Smith on 28 Feb 2019 17:19:38

When you create a PowerBI report in Power BI Desktop it transparently create \ use a git repository. So you just worked normally, then when you hit publish, it actually push to remote.

Gitignore could be used to exclude data from being published to the repository. PowerBI would have version control which is desperately needed.

This would work well with the whole Microsoft buying Github \ Azure DevOps, both from the perspective of promoting good practices such as code version control and CI\CD - process of developing in development and promoting to UAT\production

It would also allow IT to get visibility of code, allow tests to be run - such as moving DAX calculated columns with M

This would also solve the other ideas:
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/17523715-report-version-control


https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/7861287-dataset-report-version-control

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/34315045-seamless-version-control-of-queries-data-model-st

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/9677517-source-control

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/9080776-using-git-or-some-other-sccs-to-store-m-queries-n

Comments (49)
Matt Smith's profile image Profile Picture

13f80477 dc6d-4665-9f9f-73000d40a06b on 06 Jul 2020 00:02:37

RE: Built in Git support in PowerBI Desktop

Make this happen!

Matt Smith's profile image Profile Picture

4c95c056 402d-4636-9473-796c6b769b4e on 06 Jul 2020 00:02:15

RE: Built in Git support in PowerBI Desktop

This would be a HUGE update for enterprise customers. I know so many teams who choose not to use Power BI because they can't easily diff changes made to their reports. It's maintainable.

Matt Smith's profile image Profile Picture

d6732a78 f8f9-4aaf-9270-dae8855355a6 on 05 Jul 2020 23:52:56

RE: Built in Git support in PowerBI Desktop

I feel like implementing 2 simple features would solve almost all of these issues:

1. Convert a PBIX file to a PBIT and save it to a folder instead of a zip file. This would make it easy to version and compare changes manually using the desktop tool.

2. Do the above conversion on the command line for the desktop tool. This would make automating the version control process much simpler. We could then use PBIDesktop.exe for either the PBIRS or the Power BI Service to open a report, export the template as mostly plain text json files, and commit them to our version control system of choice.

Matt Smith's profile image Profile Picture

e863213a fa3a-4b39-a244-ec8140c8659f on 05 Jul 2020 23:52:28

RE: Built in Git support in PowerBI Desktop

My idea is a "Team explorer" version control window in PowerBI

This would require the ability to export the report (no data, no Power Query*) from the Power BI file as it's own git friendly file type. This would then allow full version control.

It may also require a "dataset" included template. Which would be a everything in the current template method, but git friendly format.

*like a PowerBi report that connects to a data set in PowerBi service.

Matt Smith's profile image Profile Picture

02d912eb 01cd-49db-bbf5-7c8fd34a8fc2 on 05 Jul 2020 23:51:43

RE: Built in Git support in PowerBI Desktop

Absolutely vital. We are currently using git (gitea) to store the binary files, super lame that we have no visibility into the complexities of the AAS Model, DAX, json templates, and M Language etc... Power BI is a beast and we need to be able to diff.

Seriously thinking about building a script that automatically separately breaks apart the zip so that git can get a diff. Have to tread carefully because unzip the file corrupts the pbix file in my experience, so will just break it out separately. Maybe do a filewatcher that looks for new modified date on the pbix file.

Matt Smith's profile image Profile Picture

b9b6a017 1e42-43f4-bf94-15dd962df3fb on 05 Jul 2020 23:51:38

RE: Built in Git support in PowerBI Desktop

Power BI put on Blast by SQL Server Central :)

"... not considering the need to provide some text format for the reports, I can't understand why they didn't learn from the Integration Services team and realize that binary versions of programmable items don't make sense. We need a format that can be easily versioned, and maybe more importantly, stored in a VCS and diff'd in a way humans can understand.

When building a format for storing code, please consider the need to work in a team and version the changes made. This means any format should not be a) binary and b) difficult to decode. Separate visual elements from logical elements and ensure a text version of this can be examined by developers. You can use XML, JSON, YAML, or any other text based format, but choose something that makes sense. Even if you add your own extension, ensure that standard tools that work with code can use this.

I do know the PBIX format is a ZIP file, but zip files don't easily integrate with a VCS. We could use hooks to extract/rebuild out files on commit/checkout, but that's cumbersome and silly. I'd rather that the PBIX were a folder with the files inside. Users, including my Mom, can zip a folder and email that if needed. To me, that would have been a better structure from the beginning.

Microsoft is supposed to be a company providing platforms that we build upon and use in our work. The decisions for the Power BI service seem to be poorly thought through with that in mind. I'd urge them to create a baseline set of rules for future products that consider DevOps, teams, and the need to track code."

https://www.sqlservercentral.com/editorials/microsoft-think-devops-first

https://www.sqlservercentral.com/forums/topic/microsoft-think-devops-first

Matt Smith's profile image Profile Picture

e0114358 39c9-4669-afc7-025e8edb2113 on 05 Jul 2020 23:50:53

RE: Built in Git support in PowerBI Desktop

At the very least, the DAX, M scripts and ideally the models should be able to be stored in GIT. We have a complex model and complex DAX scripts, and we have a need to share that code within various PBIX files. As of now we do all of this manually, but integration directly into Power BI Desktop would a huge help.

Matt Smith's profile image Profile Picture

062e4598 ea72-4442-a227-900cbb33ef0f on 05 Jul 2020 23:50:22

RE: Built in Git support in PowerBI Desktop

I'd suggest a publish template button for the Git integration. This way everything except the actual data will publish, maybe with the option to remove even the small amount of data resident in template files.

Matt Smith's profile image Profile Picture

1b346d83 7901-4df8-8bbe-69b2a7d0da5a on 05 Jul 2020 23:50:19

RE: Built in Git support in PowerBI Desktop

This would be amazing. Currently, diffing measures requires extracting and saving them using a 3rd party tool like Power BI Helper. Being able to natively diff PBIT files would be a major step forward.

Matt Smith's profile image Profile Picture

6a47e55b 34fb-450e-9d5f-fb96f3f1620c on 05 Jul 2020 23:47:59

RE: Built in Git support in PowerBI Desktop

Fantastic write up Matt. Totally agree with the github angle too - it makes too much sense not to pursue.