DEV Community

Cover image for Guide to Publishing and Embedding Power BI Reports on the Web with IFrames
Stephen Omengo
Stephen Omengo

Posted on

Guide to Publishing and Embedding Power BI Reports on the Web with IFrames

Introduction

In today’s data-driven world, organizations rely heavily on tools that transform raw data into valuable insights. One of the most powerful solutions for this purpose is Microsoft Power BI. It enables analysts and businesses to create interactive dashboards and reports that support informed decision-making. One of the most powerful tools for this purpose is Microsoft Power BI. It allows analysts and businesses to create interactive dashboards and reports to support decision-making.

This article provides a step-by-step guide on how to :

  1. Create a Power BI workspace
  2. Upload and publish a report
  3. Generate an Embed code
  4. Embed the report into a website using an iframe

What is Power BI? This is a business analytics tool developed by Microsoft that enables users to transform, clean data, build interactive visualizations, and connect to multiple data sources*Excel*.

What is Power BI Publishing? Publishing a Power BI report involves moving your report from Power BI Desktop to the Power BI Service cloud platform.

Prerequisites

Key things to consider before you start:

  1. Power BI Desktop installed
  2. A Power BI account
  3. A complete report

Step 1: Create a Workspace in Power BI Service

A workspace is a shared environment where you store datasets, reports, and dashboards.

Tutorial

  1. Go to Power BI Service: https://app.powerbi.com
  2. Log in using your account
  3. On the left sidebar, click Workspaces
  4. Click + New workspace
  5. Enter: .Workspace name .Description
  6. Click Save

Step 2: Prepare Your Report

You should make sure that your report is: Clean and well-structured, has meaningful visuals, uses proper relationships, and DAX measures.

Step 3: Publish the Report to Power BI Service

Tutorial

  1. Open your report in Power BI

  1. Click FilePublishPublish to Power BI
  2. Sign in if prompted
  3. Select your workspace created earlier
  4. Click Select

Once uploaded, you’ll see a confirmation message.

Step 4: Verify the Report in Power BI Service

  1. Head back to Power BI Service
  2. Open your workspace
  3. Locate your report under Reports
  4. Click to open and confirm everything is working

Step 5: Generate the Embed Code

Power BI allows you to embed reports using Publish to Web or secure embedding.
Note: Publishing to the web makes it easily accessible, and anyone with the link can view it.

Tutorial

  1. Open your report in Power BI Service
  2. Click File → Embed report → Publish to web

  1. Click Create embed code

  1. Confirm the warning
  2. Copy the generated iframe code

Step 6: Understanding the IFrame Code

The embed code will look like this:
<iframe width="800" height="600" src="https://app.powerbi.com/view?r=..." frameborder="0" allowFullScreen="true"></iframe>

Key Attributes:
.Width & height: Control size
.Src: Contains report URL
.Frameborder: Removes border
.AllowFullScreen: Enables full-screen mode

Step 7: Embed the Report into a Website

.You can embed this iframe into:

  1. HTML websites
  2. Blogs (Dev.to, Medium)
  3. Web apps

Step 8: Test Your Embedded Report

After embedding:
.Open your website in a browser
. Check: Report loads correctly, Filters and visuals work, and Responsiveness.

conclusion

Publishing and embedding Power BI reports is an essential skill for any data analyst. It allows you to transform your work into a shareable and interactive experience accessible from anywhere.

Top comments (0)