Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

parameters: having different value from desktop to web

Hi


I have this setup: my databases where powerbi is connecting to are on a named domain: i.e. db.mycompany.com.

 

So I can develop locally (as in my office I can see that domain) and publish to online (we deployed the Gateway).


However "one day" the IT won't allow us, internally, to access the domain as is but it will be protected by a SSH named connection: this setup is already working. So I can open a putty connection and change my datasource to localhost:<port> and everything works. However if I do like that, when I publish online I always have to remember to change the data source from localhost:<port> to db.mycompany.com or powerbi online will not be able to see the data.

 

So the question is: can we a way to tell powerbi that when is't desktop the server should be THIS and when it's online the server should be THAT? I tried with parameters but it doesn't work as when you load the dataset you have to go online and switch to the new parameter value.

 

thanks

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous,

 

In my opinion, I'd like to suggest you setup your connection string as query parameter that you can direct changed on service side.

 

Please take a look at following link about use query parameter to achieve change datasource on service side:

Using the Power BI Service Parameters to change connection strings (To possibly change between Dev,

 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hi Xiaoxing.That's how it's setup now, I can change the datasource using the parameter, as it's in the query string.
Unfortunately I can't make the web version automatically detect that it's running on web (instead of desktop) and switch the connection string by itself.

Anonymous
Not applicable

HI @Anonymous,

 

Have you install a gateway to handling these datasource? I think you need to add these datasources to gateway, then change on 'setting-> datasets-> gateway connection' side.

 

BTW, query parameter type should be defined with accurate type, 'any' type seems still not works on service side.

 

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hello @Anonymous,

 

Today Power BI can'ts handle this issue.

 

Cheers,

Anonymous
Not applicable

Thanks diogo.

 

I've seen here and there that Powerquery can read url parameters, so in theory i could read the url and if it's present (on desktop won't be valid) can I set the parameter dynamically?

Anonymous
Not applicable

Hello @Anonymous,

 

The URL Parameters don't work in the same way in service for now.

You can try to get a call response from the url like a ping and after that decide what queryes will go on.

I really never tried make a response of a working website via query, almoust because you will aways get nay response at all.

The cacht in it is the "if it's present

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.