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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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.

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@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.




Continued Contributor
Continued Contributor



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

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.