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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors