Power BI deployments

If you would like to automate Power BI deployments, or want to include Power BI reports in your devops pipeline you should check out Power BI Actions which a former colleague of mine created: https://marketplace.visualstudio.com/items?itemName=maikvandergaag.maikvandergaag-power-bi-actions

Power BI is both a self service BI and an enterprise BI tool. In a lot of cases, people publish reports from Power BI Desktop. This can be subject to mistakes when working in a full DTAP environment. You would always have to manually change your connectionstring if you are going to publish to a production workspace. Automating your deployments makes sense.

With Power BI Actions, you can automate the deployment to any environment and workspace. You can:

  1. Upload Power BI dashboard (pbix file).
  2. Create a Power BI workspace.
  3. Remove a Power BI workspace.
  4. Add a new Admin user to a Power BI workspace.
  5. Update the connection of a Power BI report.
  6. Refresh a dataset.

One thing to notice is that you'd probably have the Power BI reports in source control and that they will have connectionstrings to your dev databases and cubes. If you automate the deployments to other environements, you'd have to first publish the report, and then change the connectionstring with Power BI Actions. This means that:

  1. you overwrite the report in the production workspace which has a connection to production databases, with the latest version in source control, which still points to dev databases;
  2. You then change the connectionstring.

If something goes wrong between step 1 and 2, you have a report on production that still connects to the wrong environment. Ideally, you would change the connectionstring before you publish it to production. Now, there is not yet (as far as I know) a way to do this. I have tried manipulating the pbix file programmatically, but that is unsupported behaviour. It did work for a while, but doesn't anymore, which is exactly the problem with unsupported methods 😉

Automating deployments is a great idea if you are delivering Power BI reports and the underlying datasets to the business, a datawarehouse or a cube for example. Any changes to the dataset means you have to change the report itself too.

Principal BI consultant at Rubicon

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Next ArticleStreaming Twitter data to Power BI with Azure