Giter VIP home page Giter VIP logo

embed-powerbi-in-python's Introduction

Embed-PowerBI-in-Python

In this repo I will show you how to embed your Power BI report in Python Jupyter Notebook The process of Embedding Microsoft Power BI in Python Jupyter Notebook is simple and easy to use.

Requirement:

Basic knowledge of Microsoft Power BI, Power BI Service(Web), how to Publish from Power BI Desktop to web.

Step 1: Pip install the Microsoft Power BI Client. This can be done either through cmd or directly on your Notebook.

!pip install powerbiclient

Step 2: Import all necessary libraries

#import all necessary library
from powerbiclient import Report

Step 3: Get Group ID & Report ID:

NOTE: The Group ID and Report ID can be gotten from your Power BI Service workspace URL

  • Go to PowerBI Service.
  • Login with all necessary credentials.
  • Go to your WorkSpace where you have the Report published.
  • Copy out the Group ID and Report ID.

The Image below will explain better on how to go about it.

alt text

Step 4: Authentification of your device.

This section is where you will need to sign in to your Azure Cross Platform authentification.

  • Run the code below then click on the link that appears below https://microsoft.com/devicelogin.
  • After that is completed, you will need to copy the code provided.
  • Login in to the appropraite account needed and follow each steps.
# Authenticate the device to embed
from powerbiclient.authentication import DeviceCodeLoginAuthentication
 
# Initiate device authentication
device_auth = DeviceCodeLoginAuthentication()

alt text

Step 5: Generate your Power BI report

This is the last step in which you generate your Power BI report.

# Generate the report
report = Report(group_id=group_id, report_id=report_id, auth=device_auth)
report

Watch YouTube

embed-powerbi-in-python's People

Contributors

kiddojazz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.