How to Publish a Power BI Report and Embed it into a Website
Source: Dev.to
Introduction
Power BI is a business analytics service that enables you to visualize data and share insights. Publishing a report moves it to the Power BI Service (the cloud), while embedding lets you display the report inside webpages such as intranets, client portals, or public sites.
Step 1: Creating a Workspace
A Workspace in Power BI Service is a collaborative cloud environment that works like a shared folder, allowing teams to store and organize reports and dashboards.
How to create a workspace
- Open your browser and go to app.powerbi.com. Sign in with your work or school account.
- In the left sidebar, click Workspaces.
- Click + New workspace at the bottom of the panel.
- Give the workspace a clear name (e.g., Macy Cohort 15).
- (Optional) Add a description and upload a logo.
- Click Save.
Step 2: Uploading and Publishing Your Report
There are two common ways to get a report into a workspace.
Method 1 – Publish from Power BI Desktop (most common)
- Open your completed report in Power BI Desktop.
- On the Home tab, click Publish.
- In the dialog that appears, select the workspace you created.
- Click Select. Power BI uploads the report and shows a success message with a link to open it in the browser.
Method 2 – Upload a .pbix file via the browser
- In Power BI Service, navigate to your workspace.
- Click + New → Upload a file.
- Choose Local file, locate your .pbix file, and click Open.
- The report and its dataset appear in the workspace.
Step 3: Generating the Embed Code
To embed a report, you need the HTML embed snippet provided by Power BI.
- Open the report in the workspace.
- Go to File → Embed → Website or portal.
- Copy the HTML code that Power BI generates.
Step 4: Embedding the Report on a Website
Paste the copied HTML snippet into the page where you want the report to appear.
Replace YOUR_REPORT_ID and YOUR_TENANT_ID with the values from the embed code you copied.
Key Insights on Publishing and Embedding Power BI Reports
- Workspaces are essential – always publish to a dedicated workspace (not 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 appropriate licenses. Avoid exposing sensitive data publicly.
- Follow a consistent workflow – the standard process is Workspace → Publish → Generate Embed Code → Embed in Website for all Power BI reports.
Conclusion
Data insights are only valuable when they are seen and understood. Embedding Power BI reports brings your data to life for anyone visiting your website, turning raw numbers into actionable visualizations.