DEV Community

Menje
Menje

Posted on

From Desktop to Web: A Guide to Publishing and Embedding Power BI Reports

Power BI is a powerful business intelligence tool that transforms raw data into immersive, interactive visual stories. However, the true value of a report is realized only when it is shared with stakeholders. Publishing is the process of moving your report from the local Power BI Desktop environment to the cloud-based Power BI Service, where it can be managed, shared, and integrated into other platforms like company websites or portals.

Step 1: Creating a Workspace

A Workspace is a collaborative container in the Power BI Service where you house your reports, dashboards, and datasets.

  1. Sign in to the Power BI Service.
  2. On the left-hand navigation pane, click on Workspaces.
  3. Select Create a workspace (usually at the bottom of the pane).
  4. Give your workspace a unique name (e.g., "Sales Analytics 2026") and description. Click Save. You now have a dedicated "folder" in the cloud for your project.

Step 2: Uploading and Publishing Your Report

  1. Once your report is ready in Power BI Desktop, you need to push it to the workspace you just created.
  2. Open your report in Power BI Desktop.
  3. On the Home tab of the ribbon, click the Publish button on the far right.
  4. A dialog box will appear asking you to select a destination. Choose the Workspace you created in Step 1.
  5. Click Select. Power BI will begin uploading the file and its underlying data model.
  6. Once the "Success!" message appears, click the link to open the report in the Power BI Service.

Step 3: Generating the Embed Code

To put your report on a website, you need a snippet of code (an iFrame) that tells the website how to display the Power BI content.

  1. In Power BI Service, open the report you just published.
  2. Click the File menu in the top left corner.
  3. Select Embed report.

  4. Choose Publish to web (Public).
    Note: This option makes the data visible to anyone with the link. For internal company data, you would typically use the "Website or portal" option, which requires users to sign in.

  5. Click Create embed code and then Publish to confirm.

  6. A dialog will appear showing two links: a URL for email sharing and an HTML iFrame code for website embedding. Copy the iFrame code.

Step 4: Embedding the Report on a Website

  1. Now, you simply need to place that code into the HTML structure of your website. (For this, I used a basic custom HTML code from W3Schools HTML tutorials.)

  2. Open the HTML editor of your website (e.g., WordPress, Wix, or a custom .html file).

  3. Navigate to the page or section where you want the report to appear.

  4. Paste the iFrame code you copied in Step 3.

  5. Save and refresh your webpage. Your interactive Power BI report should now be live on the site!

Key Insights

β€’ Security First: "Publish to Web" is for public data only. Always use "Website or Portal" for sensitive business data to ensure only authorized users can see the visuals.
β€’ Data Freshness: Publishing is a one-time move. To keep the website data current, you must configure a Scheduled Refresh in the Power BI Service settings.
β€’ Mobile Optimization: If your website is viewed on phones, consider creating a Mobile Layout in Power BI Desktop before publishing to ensure the charts resize correctly.

Top comments (0)