DEV Community

Milcah Mukunza
Milcah Mukunza

Posted on

How to Publish a Power BI Report and Embed it into a Website

A step-by-step guide from setting up your workspace to embedding live featuring annotated instructions and code examples. In this guide, we’ll walk through the steps to publish a Power BI report and how to embed it into a website.

INTRODUCTION

What is Power BI ?
Power BI is a Microsoft tool that allows you to connect to data, create interactive dashboards and visualizations, and share insights across your organization or the web. Whether you are analyzing sales, tracking project progress, or visualizing key metrics, it enables you to turn data into meaningful reports and communicate insights effectively.

Why should we Publish Reports?

Publishing transfers your report to the cloud through Power BI Service, whereas embedding enables it to be displayed within webpages such as company intranets, client portals, or public websites.”

Step 1: Creating a Workspace

A Workspace in Power BI Service is a collaborative cloud environment that functions like a shared folder. It enables users to store and organize multiple reports and dashboards, allowing team members to access them efficiently. Creating a workspace is the first step in the publishing process

How to create One:

  • Open your browser and go to **app.powerbi.com **and sign in with your work or school account.
  • In the left sidebar, click Workspaces.
  • Click + New workspace at the bottom of the panel.
  • Give your workspace a clear name (e.g., "Macy Cohort 15").
  • Optionally add a description and upload a logo.
  • Click Save.

Work space

Step 2: Uploading and Publishing Your Report

There are two common methods for publishing a Power BI report. The first method involves publishing the report directly from Power BI Desktop to the Power BI Service. The second method allows users to upload a .pbix file manually into an existing workspace within the Power BI Service.

Method 1- Publish from Power BI Desktop (Most common)

  1. Open your completed report in Power BI Desktop.
  2. Go to the Home tab on the ribbon.
  3. Click the Publish button.
  4. A dialog will ask "Select a destination". Choose the workspace you just created.
  5. Click Select. Power BI will then upload your report.
  6. Once complete, a success message appears with a link to open it in the browser.

Method 2 - Upload .pbix via the browser

  1. In Power BI Service, navigate into your workspace.
  2. Click + New → Upload a file.
  3. Choose Local file and locate your .pbix file.
  4. Click Open. The report and its dataset will both appear in the workspace.

Step 3: Generating the Embed Code

To embed a report on a website, you need an HTML code from Power BI.

How to generate one:

  1. Open your report in the workspace.
  2. Navigate to File → Embed → Website or portal.
  3. Copy the HTML code provided.

Embed code

Step 4: Embedding the Report on a Website

Now that you have the code, embedding it is simply a matter of pasting it into your webpage's HTML. Here's how to do it on a html file:

Open your website’s HTML file in your preferred editor.
Paste the iframe code in the section where you want the report to appear. Save and refresh your website in a browser. Your interactive Power BI report should appear.

Embed Report

Key Insights on Publishing and Embedding Power BI Reports

  • Publishing and embedding Power BI reports allows your data insights to reach real users through websites and online platforms. The following key points are important to remember:
  • Workspaces are essential -Always publish reports to a dedicated workspace instead of My Workspace to enable proper sharing, management, and collaboration.
  • Choose the correct embed type -Publish to web is public and free, while secure embedding requires authentication and licences. Avoid publishing sensitive data publicly.
  • Follow a consistent workflow -The standard process — Workspace → Publish → Generate Embed Code → Embed in Website — applies to all Power BI reports.

Conclusion
Data insights are only valuable if they are seen and understood. Embedding Power BI reports brings your data to life for anyone visiting your website.

Top comments (0)