How to Publish Power BI Reports to a Public Web Site
An often overlooked, yet powerful feature of Power BI allows you to publish a report to a website using an embed code. This puts the report and underlying data out for everyone who has access to that web page. The sample page below shows a sample book I published for a training session. The following how-to will walk you through will the steps leverage this feature on your site.
This will publish and make available all the reports that are contained in the Power BI workbook. As shown below, it may look a little small in this template, however, click on the full-screen button on the bottom right of the iframe for a larger view.
- Create an Application Workspace to house your Power BI Reports. In your Power BI service, select Workspaces, then Create app Workspace. Being a shared report, I usually put these in an application workspace as a rule, however, is not a requirement. Better to seperate your projects by workspace rather than having everything in one spot.
2. Fill in the details. These details are really for the workspace and how you organize your development and QA teams.
3. From your Power BI Desktop workbook, select Publish. If you have multiple subscriptions make sure which one your accounts Power BI desktop is logged in as.
4. Select the workspace you have just created to house the published content.
5. You will get a successful message when complete.
6. Now that we have the published report, select File, and Publish to Web from the report you wish to publish. This will bring up the embed code.
7. This will bring up 2 dialog boxes that describe the service. Remember that all users that have access to that page will have access to the reports and the data that is published in the Power BI workbook. Review the screen captures here as they explain how this share will work. This report will be live and will continue to receive updates that you have scheduled on the data source.
Remember that everyone on the Internet, or the security you have your on the web page (Membership), will have access to see the data in the reports and the data set, just as a normal user.
8. The Success dialog will have the two links you need. One to link that you can provide an email notification to any users, and the other is the iframe embed code. You can change the size based on what you need, however, the final displayed result will have a “Show in Full Screen” icon.
9. The following code can be tested in a local HTML page by using your embed code. Save the file to your local system and open in the browser of your choice to test.
<!DOCTYPE html> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> <iframe width="800" height="600" src="https://app.powerbi.com/view?r=eyJrIjoiNzc ..... jN9" frameborder="0" allowFullScreen="true"></iframe> </body> </html>
Being able to share a report, samples, or public data on your public website is an amazing feature that you get with the Power BI service. Share back if you use the same feature on your site, I would love to check it out!! DM me on Twitter.