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

Introduction
Power BI is a tool used for data cleaning, analysis, and presentation. Once you build your report locally, the next step is making it accessible to others.
In this guide, you will walk through the process step‑by‑step to generate a shareable dashboard that can be viewed in a browser using an embedded iframe.
Items Needed
- Your organization’s Power BI credentials
- A completed dashboard report available locally on your machine
- A text editor such as VS Code or Sublime
Steps
Step 1 – Open Your Dashboard Report
Open your Power BI report on your local machine and click Sign in on the far right of the screen.
Step 2 – Sign In to Power BI
Provide the necessary organizational credentials (personal Gmail accounts will not work). After a successful sign‑in, your account appears in the top‑right corner.
Step 3 – Select or Create a Workspace
In the Power BI Service left navigation bar:
- Click Workspaces.
- Either create a new workspace or use an existing one provided by your organization.
Workspaces are where reports are stored after publishing.
Step 4 – Publish the Report
In Power BI Desktop:
- Click Publish on the top navigation.
- Choose your workspace from the dropdown or search for it.
Step 5 – Confirm Publishing
After selecting the workspace, Power BI shows a confirmation screen with a link indicating that the report has been successfully published.
Step 6 – Generate the Embed Code
- In your browser, go to the Power BI Service and refresh the workspace.
- Open the report you just uploaded.
- Choose File → Embed report.
- Select Website or portal (for this tutorial).
- Copy the generated iframe code.
Step 7 – Create an HTML File
Create a new file (e.g., index.html) in your text editor and paste the iframe code. Example skeleton:
Sample Dashboard
## My First Power BI Dashboard Website
Replace YOUR_EMBEDDED_LINK with the link you copied.
Step 8 – Open and Test
- Save the file.
- Right‑click
index.htmland open it in a browser.
You should see a page similar to the screenshot below. You may be prompted to sign in to Power BI to view the dashboard.
Conclusion
You have successfully:
- Published a Power BI report to the cloud
- Generated an embed link
- Displayed the report in a web page using an iframe
This approach lets you share dashboards in a more interactive and accessible way.
Notes
- Users need Power BI access to view the embedded report.
- For public sharing, Publish to web can be used, but it exposes your data publicly, so handle it carefully.
- Ensure the workspace permissions are set correctly if other users cannot access the report.
Congratulations — you have now built and shared your first embedded Power BI dashboard.