Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use Power BI Desktop with version control?

Tags:

tfs

powerbi

Greetings beloved comrades,

I am building a series of power bi dashboards, and as they go into production I'd like to put them into TFS. However, due to the large datasets involved, some of these report definitions are quite large (1.6GB).

It doesn't seem like a good idea to force TFS to store all of the actual data, when only the definition really matters.

Is there a simple way to remove the data from a .pbix file or save only the definition?

Edit: Looks like Microsoft has rendered this question obsolete with the creation of PowerBI templates. April Update for PowerBI Nevertheless, the workaround in the answer could be used for other purposes.

like image 541
Eric Hauenstein Avatar asked Jan 22 '16 18:01

Eric Hauenstein


People also ask

Do you use version control with Power BI?

Version control setup enables multiple users to have access to the same file. It applies changes depending on the permission given and provides collaboration work with specialists having to make changes. If you need any help with Power BI or other data-related matters don't hesitate to contact us!

Can I have 2 versions of Power BI desktop?

You can have 2 versions of Power BI Desktop RS (RS is synced to same version of on-premise Power BI Report Server) on the same PC running side by side.

Can two people edit Power BI at the same time?

As MFelix said, if you are trying to have multiple users edit a report and apply changes at the same time, this is currently not possible. If you are using Power BI Desktop, it only allows one person to edit locally. The reports are unrelated in everyone's hands until they are published to the service.


2 Answers

I would add a "Parameters" Query (a table with a single row - created using Edit Queries / Edit Data) with a column called [Data Load], with a single row containing "Yes".

Then I would add a Filter step to the end of all the other Queries, referring to that "Parameters" Query. The Filter syntax would be:

Parameters{0}[Data Load] = "Yes"

That syntax is a bit obscure - it means:

Go to the Parameters Query, get the value from the 1st row, in the [Data Load] column, test if it equals "Yes".

When you want to empty all the data from the .pbix file, edit the Source step in the "Parameters" Query and change the [Data Load] value to "No", Apply and Refresh.

I've built a working example of this which you can download from my OneDrive and try out:

http://1drv.ms/1AzPAZp

It's the file: Power BI Demo - Dynamically filter all data.pbix

like image 184
Mike Honey Avatar answered Oct 20 '22 09:10

Mike Honey


Convert the pbix files to a pbit file using "Save As..." option, and then version those pbit files in TFS, using Visual Studio, but controlling them on the server.

like image 45
vaibhav gandikota Avatar answered Oct 20 '22 10:10

vaibhav gandikota