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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
In order to choose the data sources depending on being executed in Power BI Desktop (dev) or Power BI Service (test, prod), we need an environment variable for power query editor.
Use case: When developping under Power BI Desktop, I need to use development data sources (with known data, in small volume). When I publish to Power Bi Service, I want the service to use production data source from the very first refresh.
I tried with parameters, but it's not satisfying:
- My M code uses env paramter to select right sources (if env = A then use dev data sources...)
- My pbix has env = A
- I publish the pbix, it overwrites the PBI service parameter & triggers a refresh
- As soon as the refresh is finished, I can modify the PBI service parameter to env = B
I'm looking for a way without having to update PBI service parameter each time I publish.
Thanks,
Alban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.