DEV Community

Abdihamid Idris
Abdihamid Idris

Posted on

Publishing a Power BI Report and Embedding It into a Website

Introduction

The topic that I find it easy to explain than ever since the starting of my data analytics classes at LuxDev HQ has been Power BI. It's like a front-end programming language where you see what you do in the Power Query or the desktop. Power BI provides Microsoft business intelligence tools, converting raw data into visualizations, dashboards, and reports. Power BI is one of the most used analytics tools by Data Analysts now, after launching in 2015. It is the organization's powerhouse in decision-making. The platform is composed of three components that are working together: Power BI Desktop, Power BI service, Power BI mobile. Building up a report in Power BI Desktop is only the beginning of the analytics journey. For your analysis to have actual business value, stakeholders must be able to read and deal with it — which is to say to publish the same thing in a place that anyone can read it. A professionally crafted dashboard on a single analyst’s laptop makes for no organizational value. The publishing process takes your report from your machine locally to the Power BI Service and makes it a living, shareable resource that can be accessed by peers, inserted into internal pages of internal platforms, or shared on websites and blogs. This article walks through the end-to-end publishing process: creating a workspace, publishing a report, generating embed code, and integrating the report onto a website. You'll get an idea of not only what this mechanical stage entails, what sorts of strategic decisions about security, licensing, and audience make or break and what kind of publication pathway is best for your own specific situation.


Understanding the Publishing Process

When you "publish" a Power BI report, you are uploading it from Power BI Desktop (your PC) to Power BI Service (the cloud). And we’re not just copying a file — the publishing also distills your data model, DAX measures, visualizations, and formatting into the Power BI Service’s cloud infrastructure, becoming resources that are independent of you and can be managed, refreshed, and shared on their own. Then once published, the report is a live thing you can share directly with your specific users through email; add to Power BI apps for organization-wide distribution; iframe code to embed into websites or applications; scheduled for data refresh automatically from source systems, all of which you can monitor for usage using built-in analytics. The publishing destinations are known as a workspace — a container containing related reports, dashboards, datasets, dataflows and all the related reports such as analytics. Every Power BI user has a "My Workspace" set-to-default for personal work. For work-a-day-work, however, professional analysis frequently occurs in shared workspaces where teams come together working together.


Step 1: Workspace

Workspace organizes your projects and controls who can access it. Here is how to create one:

  1. Open web browser and click through app.powerbi.com. Sign in with your Microsoft account.
  2. Click Workspaces in the left navigation pane.
  3. Click + New workspace at the bottom of the workspace list.
  4. Fill in the workspace details:
    • Name: Name it very clearly according to your report like example;Sale analytics report.
    • Description: Optional but useful for teams to know the meaning of workspace.
    • Advanced options: Configures access level and license mode.
  5. Click Apply.

You will see your new workspace in the Workspaces list. You can add team members later on by clicking the Access button within the workspace that will also input their email addresses with assigned roles.

The Roles of workspaces

Power BI provides four workspace roles, all with different permissions:

  • Admin: Has complete control over members,can delete workspace and update content as well as users
  • Member: Can only edit and share content but cannot add other admins or delete workspaces
  • Contributor: Has the ability to add and edit content but not permissions, does not own permissions, cannot publish apps

Normally, there are one or two admins to handle the workspace, members to building the report, and viewers consuming the finished reports.

Note: Creating shared workspaces requires a Power BI Pro or Premium Per User license. If you only have a free license you still have an access to publish to My Workspace, but sharing will be limited to users who also have Pro licenses.


Step 2: Uploading and Publishing Reports

After creating your own workspace, you can post your report via Power BI Desktop.

Publishing from Power BI Desktop

  1. Open your finished report in Power BI Desktop.
  2. Save the file (Ctrl+S) to ensure all of your most recent changes have been recorded.
  3. Click Publish on the Home ribbon.
  4. Sign in, if you are prompted, with your Microsoft account.
  5. Then a dialog appears, with available workspaces — choose your target workspace.
  6. Click Select.
  7. The tool is uploaded and the file is verified when uploaded to Power BI and once it has been posted that it is complete.
  8. Click that link to open your report in Power BI Service.

The complete publishing usually takes 30 seconds to a few minutes each time depending on file size and the complexity of the presented data.

Confirming the Published Report

After publishing, click your workspace in Power BI Service. Three items will be revealed: The Report , the Dataset and if needed a Dashboard .

Open by clicking the report name. Test every page, slicer, drill-through, and visual to make sure everything works exactly how it was in Power BI Desktop. Look through the images — embedded images can sometimes upload wrong and have to be added again in the Service.


Step 3: Create the Embed Code.

There are three embedding solutions available with Power BI for different scenarios. Choosing the wrong option may put security at risk.

Option Who Can View License Needed Best For
Publish to Web Anyone with the link (public) Free Blogs, public dashboards, portfolios
Secure Embed Authenticated Power BI users Pro for each viewer Internal corporate portals, SharePoint
Power BI Embedded Any app user (via developer setup) Azure capacity Customer-facing SaaS products

Option A: Publishing to the Web (Public Embedding)

This option creates an embed code that makes your report publicly accessible to anyone with the link. Perfect for blog posts, public dashboards, portfolio pieces, and marketing sites — but never for confidential information.

  1. Open your published report in Power BI Service
  2. In the report menu bar, click FileEmbed reportPublish to web (public)
  3. Read the warning dialog carefully — this makes your report public and indexable by search engines
  4. Click Create embed code
  5. Confirm by clicking Publish
  6. A dialog displays two items: a direct Link URL and an HTML iframe code snippet

Copy the HTML code — it looks similar to this:

<iframe 
  width="800" 
  height="600" 
  src="https://app.powerbi.com/view?r=eyJrIjoiYWJjMTIzNDU2NyIsInQiOiJ4eXo5ODc2NTQzMjEifQ" 
  frameborder="0" 
  allowFullScreen="true">
</iframe>
Enter fullscreen mode Exit fullscreen mode

Option B: Secure Embed (Internal Use)

For reports containing sensitive data, use secure embedding instead. Viewers must have a Power BI account with explicit permission to access the report.

  1. Open the report in Power BI Service
  2. Click FileEmbed reportWebsite or portal
  3. Copy the provided URL and embed code
  4. Users accessing the embedded report will be prompted to sign in with their Microsoft credentials

Option C: Power BI Embedded (For Customer-Facing Apps)

This is a paid Azure service for embedding reports into commercial applications where end users don't have Power BI licenses — for example, a SaaS analytics product that serves dashboards to thousands of customers. It requires developer setup with access tokens, API integration, and Azure capacity provisioning.


Step 4: Embedding the Report on a Website

Once you have the embed code, adding it to a website takes minutes.

Embedding in a Standard HTML Page

  1. Open your website's HTML file in any text editor
  2. Locate the spot where you want the report to appear
  3. Paste the iframe code block directly into the HTML
  4. Save the file and upload it to your web server

Example full HTML structure:

<!DOCTYPE html>
<html>
<head>
  <title>Sales Dashboard</title>
</head>
<body>
  <h1>Quarterly Sales Performance</h1>
  <p>Interactive dashboard below:</p>

  <iframe 
    width="100%" 
    height="600" 
    src="https://app.powerbi.com/view?r=YOUR_REPORT_ID" 
    frameborder="0" 
    allowFullScreen="true">
  </iframe>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

Common Issues and Troubleshooting

Publish button grayed out. This usually means that you are not signed in. Go to File → Sign in and authenticate with your Microsoft account.

"You don't have permission to publish to this workspace" error. The workspace admin has not granted you Contributor access. Request access from workspace admin.

Embedded report shows blank or "Access denied". For public embeds, verify that Publish to Web is enabled in your tenant settings (your Power BI administrator controls this). For secure embeds, ensure the viewer has been granted workspace access.

Report does not refresh automatically. Check that scheduled refresh is enabled and that data source credentials haven't expired. Expired credentials are the most common cause of failed refreshes.


Best Practices and Security Considerations

Security first. Never use "Publish to web" for reports containing personal information, financial details, customer data, or any sensitive business information. Once published publicly, the report is indexable by search engines and accessible to anyone who finds the link.

Monitor your published content. Navigate to SettingsManage embed codes in Power BI Service to see all your public embeds. Delete any that are no longer needed. Auditing public embeds should be a regular part of your Power BI governance routine.

Test across devices. Open your embedded report on desktop, and mobile to verify visuals are showing correctly. Consider building a mobile-optimized layout in Power BI Desktop before publishing, accessible through View → Mobile Layout.

Plan for data refresh. Embedded reports display the most recent dataset refresh. Configure your refresh schedule to match how often your audience expects updated numbers — daily for most business reports, hourly for operational dashboards.

Document your workspaces. As your library of reports grows, maintain documentation describing each workspace's purpose, owner, refresh schedule, and data sources. Future team members will thank you.

Use app workspaces for distribution. Instead of sharing individual reports, store related content into a Power BI app. Apps provide consumers with a curated, navigation-friendly experience and keep your behind-the-scenes workspace clean.


Conclusion

Publishing a Power BI report transforms it from a local file into an accessible business tool. The four-step workflow — creating a workspace, publishing the report, generating embed code, and inserting it into a website — takes only minutes once you understand the process.

For portfolio pieces or blog posts, publishing to web is straightforward and free. For internal business reporting, secure embedding maintains data protection while still allowing easy integration into company portals and intranets. For commercial applications serving external customers, Power BI Embedded provides the scalable infrastructure to serve reports to thousands of users with a secure access.

The technical steps are easy to learn but the strategic choices around security, licensing, and audience determine whether your published reports succeed or create problems. Always consider who should see the data before choosing an embedding option, and revisit your published content regularly to ensure it remains accurate, relevant, and appropriately secured.

Whichever path fits your needs, publishing is where Power BI reports become genuinely valuable — moving from analysis to action by putting insights directly in front of decision-makers where they work every day.

Top comments (0)