Photo by Carlos Muza on Unsplash
How to View a Live Power BI Report Inside a Microsoft Fabric Notebook
Method 1: Using the powerbiclient
Python Package
The powerbiclient
Python package makes it incredibly easy to embed Power BI reports directly within your Microsoft Fabric notebook. With just a single line of code, you can interact with a live Power BI report, allowing you to:
Use filters for quick analysis
Apply bookmarks to view pre-saved report states
Export data from visuals for further exploration
Here’s an example of how to embed the report:
from powerbiclient import Report
report = Report(report_id="Your_Report_ID")
report
Key Points:
- The
powerbiclient
package is pre-installed in Fabric notebooks, so no manual installation is required.
Method 2: Using Semantic Link Labs -Kudos to Michael Kovalsky
Alternatively, you can use the Semantic Link Labs package, which allows you to launch a Power BI report within a Fabric notebook without needing a report ID.
You can refer to the official documentation for more details.
The method looks like this:
sempy_labs.report.launch_report(report="Report_Name", workspace=None)
This function will embed the Power BI report inside the notebook. The workspace
parameter is optional and defaults to the workspace attached to your lakehouse or notebook.
Thanks for reading !!!