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
slru
New Member

data refresh fails because of python script in the data source

Hello,

 

I have a PBI report with 2 parameters (date type), a table from SQL server (import), a python script that references the parameters and creates a new table. I set the permission in data source settings to "Public". I use the new table for visuals. My goal is to be able to change the parameters on demand to change the output on the screen. I am able to achieve this on the desktop. I change the paramters using the "edit parameters" under "Transform data". The visuals are updated with the new information.  My next goal is to provide access to this report/dashboard to other people within my organization who are just consumers of this report. I want them to be able to change the dates and view the updated report. When I publish this to the PBI Service and change the parameters, data refresh failed because of python in the data source. I am using on premises gateway (standard).  I read this works only with personal gateway. However the python script is not on my local machine. The machine where gateway is installed does have python installed. How to resolve this ?

 

If I install the personal gateway and publish, will the other users be able to access and interact with this report/dashboard ? Do they need to do anything else on their side to get access? Is there any other way to achieve this without having to install personal gateway?  I have other reports that don't use python scripts and they are all running just fine. Thanks for your help.

 

 

 

 

s are 1) do the consumers of the report also need to install on premises (perosnal) gateway if they need

 

 

2 REPLIES 2
TomMartens
Super User
Super User

Hey @slru ,

 

you can install the gateway "personal-mode" on a dedicate machine with has a Python installation with the packages installed that you are using, please be aware that the same version of the package is installed.

Here you will find a comparison between the on-premises Standard and on-premises Personal gateway features: Use a personal gateway in Power BI - Power BI | Microsoft Learn

With the above setup, only a single gateway is required. But you have to be aware that changing the parameter will affect the dataset and will become effective for all your consumers. If this is not intended, then consider sharing the pbix instead, this requires a local installation of the gateway (personal).

 

I always recommend using Power Query functionalities to shape the data, of course from a statistics/analytics point of view methods are missing, but it's possible to re-write pandas' transformation to Power Query.

 

Hopefully, this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thank you,Tom, for quick response.  I installed the personal gateway and published the report to PBI service. Data refresh is working fine.

 

I go to the "Dataset" settings and change parameters, in this case they are dates. It shows the new dates. However when I go back to report, the visuals are not showing me the new dates. Next, I go back again to "Dataset" settings and change the dates 2nd time. Then the report updates to reflect the dates that I entered the first time. How do I make this changing dates and reflecting in the visuals seamless. My goal is to make this process seamless so the users start using PBI dashboards and move away from emailing spreadsheets/pdfs back and forth. Thanks for your help.

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.