Automating Power BI Desktop Refresh

Power BI Desktop is becoming an increasing popular tool for self-service reporting. But it has a glaring gap. Unlike Excel, it doesn’t currently support an object model for automating tasks. Yet, there are a variety of scenarios that call for task automation, such as refreshing imported data. For example, one customer wanted to show a Power BI Desktop dashboard on a shared monitor that will refresh itself periodically. In another scenario, an ISV wanted to automate the data refresh because Power BI Embedded doesn’t currently have APIs to support a scheduled refresh.

Currently, there is no supported way to refresh Power BI Desktop files automatically. However, you can try the following approaches at your own risk:

  1. Use the Michal Dúbravčík’s PBIXRefresher script. This is a PowerShell script that opens Power BI Desktop and sends a key to the Refresh button.
  2. Shell out to open Power BI Desktop with the file you want to refresh (pbidesktop.exe <filepath to pbix file>). Then, find programmatically the port that the PBI SSAS listens on (see my “Upgrading Power BI Desktop Models to Tabular” blog on this subject). Then, use AMO or the new Tabular Object Model to send a process script command.
  3. Use the commercial Power Update tool, which is capable of refreshing Excel Power Pivot workbooks and Power BI Desktop files.

  • jaroreken

    There is a tool called Power Update which can do the PBIX files update since few week. The guys from PowerPivot Pro really like it :) http://www.powerpivotpro.com/2015/02/introducing-power-update/

    • Prologika

      The last time I checked Power Update was limited to Excel models and didn’t support Power BI Desktop files. Has this changed?

      • jaroreken

        As far as I read the documents and comments in posts it was written that it supports it. But to be honest I have not tested it yet. :)

        • Prologika

          Yes, you were right. I checked with Power Update to confirm they support Power BI Desktop refresh and added it as a commercial option.