Tuesday, 12 April 2016

Embedding Power BI Reports in a Webpage

The ability to embed and publicly share Power BI reports is an attractive feature. The process seems straight-forward. There are important things to note, some legal, some functional. Lets start with the boring legal stuff, covered in detail on the Power BI website here

In short, be aware of the following:
  • This is about public, open access sharing of data. Think before you embed...
  • This is Pro-license feature.
Now for the good stuff, actually doing it. To begin decide on what content you want to embed.

The content has to be a report, currently individual visualisations or dashboards can't be embedded. Create a new report with the required content on it, the suggestion here is to ring-fence embedded content from content distributed by other means. Also, as any applied update to embedded reports automatically syncs to destination web site you'll probably want to leave this report alone once it has been embedded.

From the View menu within the report choose the appropriate view mode for the content being embedded. Some experimentation may be required here. The visuals at the end of this post are rendered using Dynamic view mode.


Now generate the embed code from the File menu.


Read and digest the messages, before proceeding. Eventually you will be provided with some html code, an example below with the unique identifier removed.


Width, height, frameborder and allowFullScreen are all configurable. To get the result required for this blog post all that was needed was to tweak the width slightly.

This is still a preview feature... the time taken for a change to sync across from the Power BI report to the destination web-site was a little hard to predict and also some distance from near real-time.

The control is pleasant enough to work with, especially in full-screen mode. All interactivity built into the report such as drill capability in the example above are available within the embedded window or in full screen mode.

Exciting as this is, imagine how much fun developers are going to have exploiting the possibilities offered up by this announcement.

More on this soon.

1 comment: