Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Change connection/server


I created a small demo of charts etc. using an SQL Server connection and the desktop version of Power BI.

Now I want to re-use the "pbix" file on another connection (another server, same DB name, same tables,views etc.).

How can I achieve this? The "pbix" files seems to be not editable so that I cannot replace the connection string this way.


Or is this not possible at all?




Power Participant
Power Participant

@konradmd For more detailed step in changing credentials and server name, you can find the blog written by me on our company website in below link


Super User
Super User

Home tab, "Edit Queries", pick your query, click on the gear next to the Source step and edit the source.

@ me in replies or I'll lose your thread!!!
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

@konradmd After clicking on edit queries in top ribbon. Find the steps as shown below. Hope this helps!



This doesn't work for tables in DirectQuery mode. Is there another way to do this for DQ?

Thank you both for your help. This worked as a first step for me.


But can I change the datasource/credentials in a pbix-file without any user interaction, e.g., via command line or a startup parameter of the desktop version of PowerBI?

This works great if you have one data source.  I have several queries from the same SQL Server that I need to change the connection to.


I also need a way to do a "replace" for the database server/database.

You most likely know this by now:


Create a Blank Query 



       Source = "https://<tenant>"


Note: Uncheck Enable on Load (So that it does not appear as a table (You can aslo use a parameter

Update All Other Queries

Source = OData.Feed(CRMServiceURL),



I even have several tables from the same SQL server. I want to update the Database name and Server name at a glance for all the tables. 


Please help me on this.




Responsive Resident
Responsive Resident



Well, I guess you either have to

a) change all the advanced settings to the right DB name + servername


b) use variables, as described in this blogpost.


... but in order to do that, you still have to touch all queries, i guess...

Helpful resources

September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Dev Camp Session 26

Check it Out!

Mark your calendars and join us on Thursday, September 29 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors