Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello! Is there way to check current environment in Power Query?
I.e. - is it running on "desktop" or "service"?
The reason I'm asking - I want my report to automatically use different data sources, depending: is it working on my PC? or on the server?.
hello pavel_severov, I have the same need, did you sort it out ?
I tried with parameters, but it's not satisfying:
- My M code uses env paramter to select right sources (if env = ...)
- 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.
Any idea ?
Alban
Hi aalev,
Unfortunately there is no way to get any environment data from Power BI scripts.
At least I don't know anything about it. I would be happy to be wrong.
Ok, thanks @pavel_severov , I submited a feature request here:
Please support with your votes !
Alban
ok
Best Regards
Maggie
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
17 | |
9 | |
8 | |
7 | |
7 |