Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python and Power BI Desktop
#1
Question 
I want to use Python to automate tasks in Power BI Desktop (i.e. open a Power BI Desktop workbook, filter a report, save a workbook, publish a workbook to Power BI Online, etc.). Power BI Desktop has some integration with Python but from what I can tell it is focused on importing data, and creating and controlling visuals. I want to control an existing workbook that already has visuals etc.

Does anyone know if python has any libraries for working with Power BI Desktop?

I found this one but it seems like it is for the Power BI Online service and not the desktop client.
https://pypi.org/project/python-power-bi/

If there isn't a library for the desktop app, does anyone know of other ways I can automate tasks in Power BI Desktop?
Reply
#2
Yes, there are several libraries available for working with Power BI Desktop in Python, including:

powerbi-python: A library for programmatically managing and manipulating Power BI resources, such as datasets and reports.
powerbi-py: A Python wrapper for the Power BI REST API that allows you to interact with Power BI resources from Python.
python-pptx: A library for creating and updating PowerPoint (.pptx) files, which can be used to generate reports in Power BI.
It is worth noting that Power BI also has its own Python library, powerbi, which can be used to do things like getting data from data sources, and creating visualizations.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Coding in Power BI Visual vjrans 0 280 Jan-31-2024, 07:54 AM
Last Post: vjrans
  Power Shells vs Compile and Run programs? RockBlok 2 392 Jan-13-2024, 09:08 PM
Last Post: RockBlok
  Setting up new Python kernel for JupyterLab Desktop on M1 Mac daler6 0 1,270 Jun-20-2022, 03:45 AM
Last Post: daler6
  Raising numbers to power ** GJG 3 2,456 Mar-23-2021, 03:43 PM
Last Post: deanhystad
  Detecting power plug Narayan 2 2,730 Aug-01-2020, 04:29 AM
Last Post: bowlofred
  NameError: name 'display' is not defined when running code on power bi beginner1 2 19,221 Jul-24-2019, 11:03 AM
Last Post: beginner1
  power spectrum from 2Dfft sdipti596 1 2,329 Mar-30-2019, 12:34 AM
Last Post: scidam
  python result problem of an iteration algorithm for power allocation Jessica 1 2,645 Sep-07-2018, 08:08 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020