DEV Community

Faith Rotich
Faith Rotich

Posted on

How to Publish a Power BI Report and Embed It into a Website

Introduction
Microsoft Power BI is a powerful business intelligence tool used to transform raw data into interactive dashboards and reports. Once a report is built in Power BI Desktop, the next step is to publish it to the Power BI Service and embed it into a website so others can view and interact with it.
This article walks through the complete process:
• Creating a workspace
• Publishing a report
• Generating embed code
• Embedding the report into a website
• Uploading your .pbix file to GitHub

  1. Overview of the Publishing Process The workflow looks like this:
  2. Build report in Power BI Desktop
  3. Publish to Power BI Service (cloud)
  4. Store report in a workspace
  5. Generate embed code
  6. Embed into a website

  7. Step 1: Create a Workspace
    A workspace is where your reports, dashboards, and datasets are stored online.

🔹 Steps

  1. Go to: https://app.powerbi.com
  2. Sign in with your account
  3. On the left panel, click Workspaces
  4. Click + New workspace
  5. Enter: o Name: Electronics Sales Dashboard o Description (optional)
  6. Click Save

  7. Step 2: Publish Your Report

🔹 From Power BI Desktop

  1. Open your Electronics Sales Assignment (.pbix)
  2. Click Home → Publish
  3. Sign in (if prompted)
  4. Select your workspace: o Electronics Sales Dashboard
  5. Click Select

  6. Step 3: Upload .pbix File to GitHub
    This ensures version control and submission requirements.

🔹 Steps

  1. Go to GitHub
  2. Create a new repository: o Name: powerbi-electronics-sales
  3. Click Add file → Upload files
  4. Upload your .pbix file
  5. Add a commit message: Added Electronics Sales Power BI report
  6. Click Commit changes

  7. Step 4: Generate Embed Code
    There are two main ways to embed:
    • Public (Publish to web)
    • Secure (for organizations)

🔹 Method: Publish to Web (Public)

  1. Go to your report in Power BI Service
  2. Click File → Embed report → Publish to web
  3. Click Create embed code
  4. Confirm when prompted

Power BI generates:
• Embed link
• HTML iframe code

Example Embed Code:

  1. Step 5: Embed Report into a Website 🔹 Option 1: Basic HTML Website
  2. Open your HTML file
  3. Paste the iframe code:

    Electronics Sales Dashboard

  1. Save and open in browser 🔹 Option 2: Blog Platforms (e.g., WordPress)
  2. Open post/page editor
  3. Switch to HTML view
  4. Paste iframe code
  5. Publish

  6. Important Notes on Embedding
    Publish to Web is PUBLIC
    • Anyone with the link can view
    • Do NOT use for sensitive data
    ✔ Use secure embedding for:
    • Company dashboards
    • Private data


  7. Key Insights
    • Power BI Desktop is used for building reports
    • Power BI Service is used for sharing and collaboration
    • Workspaces organize content
    • Embedding allows reports to be integrated into websites
    • GitHub helps with version control and submission tracking


    Conclusion
    Publishing and embedding reports from Microsoft Power BI transforms your analysis into a shareable, interactive experience. By combining Power BI Service with platforms like GitHub, you not only present insights but also maintain a professional workflow for collaboration and deployment.
    Mastering this process is essential for any data analyst, as it bridges the gap between analysis and real-world application.

Top comments (0)