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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jonm818
Frequent Visitor

Python in Power Query and Power BI Service Refresh

Hello, first time posting on here so please let me know if am missing anything 

 

Background:

I have a Power BI report and the sources (two excel files) saved in a single sharepoint folder. The Power BI Report is imported in Power BI Service as a dataset in a shared workspace. The workspace is shared with other members of my team who manage their own reports. 

 

The excel sources are system generated reports that are received via outlook and saved to the sharepoint folder, as mentioned above, on a daily basis using Power Automate. The two excel sources are imported and transformed using python (pandas libary) in Power Query to produce a single table, which is used for creating the visuals in my Power BI report. 

 

Problem:

The OneDrive refresh is set to ON for the dataset, but the report doesnt reflect the latest data.

I get the following error:

jonm818_0-1610841476368.png

 

I have to manually open the Power BI desktop report saved in the sharepoint folder, hit refresh and then save. I then refresh the dataset in the workspace; I still get the error but atleast the data in the app is updated with the most recent information. 

 

Although the error doesnt explicitly state its a python error, i have BI reports which have an identical process without using python in power query, and they refresh daily without any issues. 

 

Can someone please advice if its possible to get this to refresh daily. I am doing something wrong? Or is there a better work around?

1 REPLY 1
lbendlin
Super User
Super User

To refresh python scripts in the service you need to use a personal (not enterprise) gateway.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.