Skip to main content
Microsoft Idea

Power BI

New

Power BI as Code

Vote (8) Share
Mike Beerman's profile image

Mike Beerman on 30 Aug 2021 13:25:39

Hi,



My company has adopted an 'as Code' mantra to every possible product that supports it. For instance, all our Cloud infrastructure is created as code with either Azure Resource Manager (JSON) templates, Azure Pipelines (YAML), or even Terraform since we're a multi-cloud company. Security is defined as code. We even write our documentation in .md files in Git and deploy that to our customers.



Unfortunately Power BI doesn't support any such scenarios. PBIX files can't be opened in Visual Studio Code, and can't be source controlled in a meaningful manner with Git.



The only thing that's possible is to save PQX and PBIDS files, which can both be edited and source controlled in Git, then PQX file content can be copy & pasted into a Power BI Desktop Power Query Editor window, to compile it into a PBIX file.



It'd be great if we could 'live link' PBIDS, PQX, and DAX query files in Power BI Desktop, so that the development team can edit those queries and data sources in Visual Studio Code, commit them to Git, have them PR'ed, then have a report designer open up Power BI Desktop and automatically import the changes in the files that came from Git.



Of course, it would be even cooler if the entire PBIX file was compiled from Visual Studio Code based on the breakout files, but I'd go for a phase 1 implementation where they're imported into Power BI Desktop upon refresh as well



Cheers,

Mike

Comments (1)
Mike Beerman's profile image Profile Picture

Holger Schimanski on 04 Jul 2023 19:11:41

RE: Power BI as Code

This is now in nice progress I would say. Have a look at latest announcements like here https://powerbi.microsoft.com/de-de/blog/deep-dive-into-power-bi-desktop-developer-mode-preview/