How to Publish a Power BI Report and Embed It into a Website
Publishing a Power BI report and embedding it on a website is a straightforward process that lets you share interactive dashboards with anyone online. Below is a step-by-step guide covering both public and secure embedding options. learn.microsoft
Step 1: Prepare and Publish Your Report to Power BI Service
Before you can embed a report, it must be published to the Power BI cloud service.
Open your report in Power BI Desktop
Make sure your.pbixfile is complete and saved. devClick Publish
In the Home tab, click the Publish button. devSign in and select a workspace
If prompted, sign in to your Power BI account, then choose the workspace where you want to publish the report. devConfirm the upload
Once published, you’ll see a success message with a link to open the report in the Power BI service. dev
Step 2: Generate the Embed Code
You have two main options depending on whether you want the report to be publicly accessible or restricted to authenticated users.
Option A: Publish to Web (Public)
Use this if you’re okay with anyone on the internet viewing your report—ideal for portfolios, blogs, or public dashboards. learn.microsoft
Open your report in Power BI Service
Go to app.powerbi.com, navigate to your workspace, and open the report. learn.microsoftClick File > Embed report > Publish to web (public)
This opens the embed dialog. learn.microsoftReview the warning
Power BI will warn you that the report will be public. Confirm only if your data is safe to share. learn.microsoftCreate embed code
Click Create embed code, then copy the<iframe>HTML snippet provided. dev
Option B: Secure Embed (Website or Portal)
Use this for internal dashboards where viewers must log in to Power BI. learn.microsoft
Open your report in Power BI Service
Navigate to your workspace and open the report. learn.microsoftClick File > Embed report > Website or portal
This opens the secure embed dialog. learn.microsoftCopy the link or iframe code
You can either copy the embed link or the<iframe>HTML snippet to paste into your site. learn.microsoft
Step 3: Embed the Report on Your Website
Now that you have the embed code, you can add it to your website.
For Custom HTML Sites
Open your HTML file
Use a code editor like VS Code or your CMS editor. devPaste the iframe code
Insert the<iframe>snippet inside the<body>section where you want the report to appear. devSave and publish
Upload the updated file to your web server or publish the changes in your CMS. dev
For WordPress or Other CMS Platforms
Open the page editor
Go to the page where you want the report. devAdd a Custom HTML block
In WordPress, insert a “Custom HTML” block. devPaste the iframe code
Drop the code into the block and update or publish the page. dev
Important Considerations
- Data privacy: Only use “Publish to web” if your report contains no sensitive or confidential data. learn.microsoft
- Admin settings: Your organization’s Power BI admin may need to enable “Publish to web” in the admin portal. youtube
-
Responsiveness: You can adjust the
widthandheightattributes in the iframe to fit your site’s layout. learn.microsoft
With these steps, your Power BI report will be live and interactive on your website, letting visitors explore your data in real time. dev
Top comments (0)