Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
fortuit
Frequent Visitor

Get data from Power BI with Python

Hello,

Does anyone know how to connect to a dataset in Power BI desktop and export the content of this dataset using Python scripts?

I often see examples of using pandas package to import data in Power BI (from external sources to Power BI) but not the other way (from Power BI to external service)...

The idea is to be able to read data from power BI report, a bit like what can be done with pandas through "pandas.read_excel" when one wants to retrieves data from an xlsx file.

With the Power BI REST API, it seems we can only get list of dataset, not the content of dataset.

Any idea ?

2 REPLIES 2
dm-p
Super User
Super User

Hi @fortuit,

With the introduction of external tools into preview, you can create something to connect to Power BI Desktop via the local port your model exposes. David Eldersveld has a great 4 part worked example for doing this with Python - he uses Jupyter as a means of writing DAX against the model to extract data and you could probably leverage some of his work to see if you can do what you want.

Regards,

Daniel

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Greg_Deckler
Community Champion
Community Champion

@fortuit - Maybe via the Power BI REST API?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.