With Power BI Publish to web, you can easily embed interactive Power BI visualizations online, such as in blog posts, websites, through emails or social media, on any device.
You can also easily edit, update, refresh or un-share your published visuals.
How to use Publish to Web
Publish to web is available on reports in your personal or group workspaces that you can edit. You cannot use Publish to web with reports that were shared with you, or reports that rely on row level security to secure the data.
You can watch how this feature works in the following short video. Then, follow the steps below to try it yourself.
The following steps describe how to use Publish to web.
- On a report in your workspace that you can edit, select File > Publish to web.
- Review the content on the dialogue, and select Create embed code as shown in the following dialogue.
- Review the warning, shown in the following dialog, and confirm that the data is okay to embed in a public website. If so, select Publish.
- A dialog appears that provides a link that can be sent in email, embedded in code (such as an iFrame), or that you can paste directly into your web page or blog.
- If you’ve previously created an embed code for the report, the embed code quickly appears. You can only create one embed code for each report.
Tips and Tricks for View modes
When you embed content within a blog post, you typically need to fit it within a specific size of the screen. You can also adjust the height and the width in the iFrame tag as needed, but you may also need to ensure your report fits within the given area of the iFrame, so you also need to set an appropriate View Mode when editing the report.
The following table provides guidance about the View Mode, and how it will appear when embedded.
Tips and tricks for iFrame height and width
The embed code you receive after you Publish to web will look like the following:
You can edit the width and height manually to ensure it is precisely how you want it to fit onto the page into which you’re embedding it.
To achieve a more perfect fit, you can try adding 56 pixels to the height dimension of the iFrame. This accomodates the current size of the bottom bar. If your report page uses the Dynamic size, the table below provides some sizes you can use to achieve a fit without letterboxing.
Managing embed codes
Once you create a Publish to web embed code, you can manage the codes you create from the Settings menu of the Power BI service. Managing embed codes includes the ability to remove the destination visual or report for a code (rendering the embed code unusable), or getting the embed code again.
- To manage your Publish to web embed codes, open the Settings gear and select Manage embed codes.
- The list of embed codes you’ve created appears, as shown in the following image.
- For each Publish to web embed code in the list, you can either retrieve the embed code, or delete the embed code and thus make any links to that report or visual no longer work.
- If you select Delete, you’re asked if you’re sure you want to delete the embed code.
Updates to reports, and data refresh
After you create your Publish to web embed code and share it, the report is updated with any changes you make. However, it’s important to know that it can take a while for update to be visible to your users. Updates to a report or visual take approximately one hour to be reflected in Publish to web embed codes.
When you initially use Publish to web to get an embed code, the embed code link is immediately active and can be viewed by anyone who opens the link. After the initial Publish to web action, subsequent updates to reports or visuals to which a Publish to web link points can take approximately one hour to be visible to your users.
To learn more, see the How it works section later in this article. If you need your updates to be immediately available, you can delete the embed code and create a new one.
Data refreshes are automatically reflected in your embedded report or visual. It can take approximately 1 hour for refreshed data to be visible from embed codes. You can disable automatic refresh by selecting do not refresh on the schedule for the dataset used by the report.
Custom visuals are supported in Publish to web. When you use Publish to web, users with whom you share your published visual do not need to enable custom visuals to view the report.
Publish to web is supported for the vast majority of data sources and reports in the Power BI service, however, the following are not currently supported or available with Publish to web:
- Reports using row level security.
- Reports using any Live Connection data source, including Analysis Services Tabular hosted on-premises, Analysis Services Multidimensional, and Azure Analysis Services.
- Reports shared to you directly or through an organizational content pack.
- Reports in a group in which you are not an edit member.
- “R” Visuals are not currently supported in Publish to web reports.
- Exporting Data from visuals in a report which has been published to the web
- ArcGIS Maps for Power BI visuals
- Reports containing report-level DAX measures
- Secure confidential or proprietary information
Power BI administrators can enable or disable the publish to web feature. They may also restrict access to specific groups. Your ability to create an embed code changes based on this setting.
Understanding the embed code status column
When viewing the Manage embed codes page for your Publish to web embed codes, a status column is provided. Embed codes are active by default, but you may encounter any of the states listed below.
How to report a concern with Publish to web content
To report a concern related to Publish to web content embedded in a website or blog, use the Flag icon in the bottom bar, shown in the following image. You’ll be asked to send an email to Microsoft explaining the concern. Microsoft will evaluate the content based on the Power BI Terms of Service, and take appropriate action.
To report a concern, select the flag icon in the bottom bar of the Publish to web report you see.
Licensing and Pricing
You need to be a Microsoft Power BI user to use Publish to web. The consumers of your report (the readers, viewers) do not need to be Power BI users.
How it works (technical details)
When you create an embed code using Publish to web, the report is made visible to users on the Internet. It’s publicly available so you can expect viewers to easily share the report through social media in the future. As users view the report, either by opening the direct public URL or viewing it embedded in a web page or blog, Power BI caches the report definition and the results of the queries required to view the report. This approach ensures the report can be viewed by thousands of concurrent users without any impact on performance.
The cache is long-lived, so if you update the report definition (for example, if you change its View mode) or refresh the report data, it can take approximately one hour before changes are reflected in the version of the report viewed by your users. It is therefore recommended that you stage your work ahead of time, and create the Publish to web embed code only when you’re satisfied with the settings.
When you use Publish to web, the report or visual you publish can be viewed by anyone on the Internet. There is no authentication used when viewing these reports. Only use Publish to web with reports and data that the anyone on the Internet (unauthenticated members of the public) should be able to see.