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

Using python script in Power BI services

Hi Everyone,

 

I'd like to ask if anyone knows how to use python script in power bi services without personal gateway. I created some tranformations using python scripts, it works perfectly fine in power bi desktop but when I publish it to services it won't work without personal gateway. I'm not sure why is that ? 

My issue is conected with timezones, I'm using python function to convert datetime UTC (which power bi uses) to CET, when I publish table with two columns, first is DateTime.LocalNow() second is transformation which should make it different time zone (CET) but suprisingly when I'm publishing it to services DateTime.LocalNow() show my local time instead of UTC - probably it somehow contects to local machine and do some operations there 

2 REPLIES 2
Anonymous
Not applicable

Hi @DamianNew ,

If I understand correctly, the issue is that you want to use python script without personal gateway. Please try the following methods and check if they can solve your problem:

1.Power BI Service requires a data gateway to refresh datasets that include Python scripts.

 

2.Move the Python script as a web service to the Azure Machine.

 

3.Python as a visual doesn't need a Personal Gateway. You can view the following link.

Solved: Re: Using Python in Power BI without Personal Gate... - Microsoft Fabric Community

Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Wisdom Wu

Anonymous
Not applicable

Hi, DamianNew,

If I understand correct you need the column in UTC datetime.
What if you use DateTimeZone.UtcNow() instead of  DateTime.LocalNow()?
Best,

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.