DEV Community

NelimaL
NelimaL

Posted on

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

Introduction
As s student data plumber, there are very high chances are you've come across Power BI, Microsoft’s powerful business intelligence tool that transforms raw data into meaningful insights through interactive dashboards and reports.
So far, as a data student I’ve explored Power BI queries, DAX, data modeling, joins, charts, dashboards, and reporting. But creating a report is only half the job. The real value comes when you share it with others.

In this article, I’ll walk you through how to:

  • Publish a Power BI report
  • Generate an embed code
  • Embed the report into a website By the end, you’ll be able to make your reports accessible and interactive for users beyond Power BI.

What is Power BI Publishing?
Publishing in Power BI means uploading your report from Power BI Desktop (.pbix file) to the Power BI Service (cloud platform). Once published, your report can be shared, collaborated on, or embedded into websites.

Step 1: Create a Workspace
A workspace is like a container where your reports, dashboards, and datasets live.
Steps:
Go to Power BI Service (https://app.powerbi.com)
Sign in with your account
On the left sidebar, click Workspaces
Click + New workspace
Enter: Workspace name(e.g., Linda Nelima Workspace)
Description (optional)
Click Save

Workspace screenshot

Step 2: Upload and Publish Your Report
Now that your workspace is ready, let’s upload the .pbix file.
Steps:
Open your project in Power BI Desktop
Click File → Publish → Select Workspace
Choose the workspace you created
Click Select
Publish icon
Alternatively (via browser):
Open your workspace in Power BI Service
Click Upload → Browse
Upload your .pbix file
Once uploaded, your report and dataset will appear in the created workspace.
Pop up message
Step 3: Generate the Embed Code
Power BI allows you to embed reports using an iframe.
iframe:(short for inline frame) is an HTML element that embeds another document, such as a video, map, or webpage, within the current HTML webpage
Steps:
Open your report in Power BI Service
Click File → Embed report → Publish to web (public)
Click Create embed code
Copy the generated iframe code
Note:“Publish to web” makes your report publicly accessible. Avoid using this for sensitive data.
Embeding

Step 4: Embed the Report on a Website
Now let’s embed the report into a simple HTML page.
Example:
<!DOCTYPE html>


Power BI Report


Kenya Crops Dashboard

<iframe width="800" height="600"
    src="YOUR_EMBED_LINK_HERE"
    frameborder="0"
    allowFullScreen="true">
</iframe>



Steps:
Replace YOUR_EMBED_LINK_HERE with your copied embed URL
Save the file as index.html
Open it in a browser

You should now see your interactive Power BI report embedded on the page.

Key Insights
Power BI makes it easy to move from data analysis to sharing insights
Workspaces help organize and manage reports efficiently
Embedding reports allows integration with web apps and dashboards
Always be cautious with data privacy when using public embed options

Top comments (0)