DEV Community

Dalton Imbiru
Dalton Imbiru

Posted on

How to publish a Power BI report and embed it into a website using an iframe.

Publishing and Embedding Power BI Reports on the Web

Power BI is a business intelligence tool from Microsoft that makes it easy for users to transform raw data into meaningful insights using interactive dashboards and reports.

Power BI's most powerful feature is the ability to publish reports online and embed them into websites, allowing others to interact with the data without having direct access to Power BI.

This article will take you through the process of creating a workspace to embedding a report using an iframe, with visual guidelines and key insights.

1. Creating a Workspace in Power BI

This is where reports, dashboards, and datasets are stored and managed.

Steps to Create a Workspace

  • On your browser, go to Power BI Service
  • Sign in with your account
  • On the left sidebar, click Workspaces
  • Click Create a workspace

image

  • Enter:
    • Workspace name
    • Description
  • Click Save

image

Key Notes

  • Workspaces help organize your reports
  • You can collaborate with others by adding members
  • “My Workspace” is private, while new workspaces can be shared

2. Uploading and Publishing Your Report

After creating a report in Power BI Desktop, the next step is publishing it to the Power BI Service.

Steps to Publish

  • Open your report in Power BI Desktop
  • Click File → Publish → Publish to Power BI
  • Sign in if prompted
  • Select the workspace you created
  • Click Select

Image

Verify Upload

  • Go back to Power BI Service
  • Open your workspace
  • Confirm your report appears under:
    • Reports
    • Datasets

Image

Key Notes

  • Any updates in Power BI Desktop can be republished
  • Changes reflect automatically in the online version

3. Generating the Embed Code

To display your report on a website, you need an embed code, which Power BI generates for you.

Steps to Generate Embed Code

  • Open your report in Power BI Service
  • Click File
  • Select Embed report
  • Choose Publish to web (public)
  • Click Create embed code
  • Confirm the warning message

Image

What You Get

  • A public URL
  • An iframe embed code

Image

Uploading the Power BI report into a website

  • Open a new file in Visual Studio Code, generate an HTML boilerplate, and paste the iframe link into the body section.
    -Run the HTML file.
    Image

  • After running the HTML file, a webpage will load in the browser displaying the Power BI Dashboard that a user can interact with.
    Image

Top comments (0)