Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
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
Hi, DamianNew,
If I understand correct you need the column in UTC datetime.
What if you use DateTimeZone.UtcNow() instead of DateTime.LocalNow()?
Best,
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!