DEV Community

Audrine Marion
Audrine Marion

Posted on

How to publish a Power BI report and embed it into a website.

Microsoft Power BI is a powerful business intelligence tool that enables users to transform raw data into interactive dashboards and reports. One of its most useful features is the ability to publish reports to the Power BI Service and embed them into websites for sharing insights with a wider audience.

This guide walks through the full process step by step: creating a workspace, publishing a report, generating embed code, and embedding the report into a website.


Step 1: Create a Workspace in Power BI Service

A workspace is a collaborative environment where reports, dashboards, and datasets are stored before publishing or sharing.

Steps:

  1. Sign in to Power BI Service (https://app.powerbi.com).
  2. From the left navigation panel, select Workspaces.
  3. Click New workspace.
  4. Enter a workspace name and description.
  5. Click Save.

My Workspaces
Then proceed to add New Workspace

Why this matters:
Workspaces help organize reports and control access permissions for collaboration and publishing.


Step 2: Upload and Publish Your Report

Once your workspace is ready, the next step is publishing your Power BI Desktop report.

Steps:

  1. Open your report in Power BI Desktop.
  2. Click File → Publish or select Publish from the Home ribbon.
  3. Choose your created workspace.
  4. Click Select.
  5. Wait for the confirmation message indicating successful publishing.

Publish Button

Why this matters:
Publishing moves your report from local development to the cloud where it can be shared and embedded.


Step 3: Generate the Embed Code

After publishing the report, you can generate embed code from Power BI Service.

Steps:

  1. Open Power BI Service.
  2. Navigate to your workspace.
  3. Select your report.
  4. Click File → Embed report → Publish to web (public).
  5. Confirm the security warning.
  6. Copy the generated HTML iframe embed code.

Embed Report

iFrame

Why this matters:
The iframe embed code allows your report to be displayed inside a webpage.


Step 4: Embed the Report on a Website

Once the embed code is generated, you can place it inside your website's HTML.

Example HTML Code:

<iframe
    width="800"
    height="600"
    src="https://app.powerbi.com/view?r=YOUR_EMBED_LINK"
    frameborder="0"
    allowFullScreen="true">
</iframe>
Enter fullscreen mode Exit fullscreen mode

Steps:

  1. Open your website HTML file.
  2. Paste the iframe code where the report should appear.
  3. Save changes.
  4. Refresh your webpage.

Web Example

Why this matters:
Embedding enables stakeholders and users to interact with dashboards without logging into Power BI.


Key Insights and Best Practices

Publishing and embedding Power BI reports makes insights accessible to a broader audience. However, it is important to understand visibility settings before sharing.

Key takeaways:

  • Workspaces help manage report access and organization.
  • Publishing moves reports from Desktop to Power BI Service.
  • Embed codes allow reports to be integrated into websites.
  • "Publish to web" makes reports publicly accessible, so sensitive data should not be included.

Conclusion

Publishing and embedding Power BI reports is a straightforward process that significantly enhances data accessibility and collaboration. By following these steps, you can successfully move your report from Power BI Desktop to a live website and share insights interactively with your audience.

Adding screenshots at each step improves clarity and helps users follow the workflow more easily.

Top comments (0)