cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
konradmd Frequent Visitor
Frequent Visitor

Change connection/server

Hi,

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?

 

Thanks

Konrad

8 REPLIES 8
Super User
Super User

Re: Change connection/server

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


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

ashishrj Senior Member
Senior Member

Re: Change connection/server

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

 

SQL.png

ashishrj Senior Member
Senior Member

Re: Change connection/server

@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

http://www.cloudfronts.com/change-users-and-environment-in-power-bi-desktop-for-crm-online-data-sour...

 

konradmd Frequent Visitor
Frequent Visitor

Re: Change connection/server

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?

malindajepsen Occasional Visitor
Occasional Visitor

Re: Change connection/server

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.

v-sadadi Regular Visitor
Regular Visitor

Re: Change connection/server

Hi,

 

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.

 

Thanks

Satya

Bjoern Established Member
Established Member

Re: Change connection/server

@v-sadadi

 

Well, I guess you either have to

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

or

b) use variables, as described in this blogpost.

 

http://businessintelligist.com/2015/05/12/power-bi-tutorial-how-to-parameterize-connection-variables...

 

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

medwards807 Regular Visitor
Regular Visitor

Re: Change connection/server

You most likely know this by now:

 

Create a Blank Query 

 

//CRMServiceURl//

   let
       Source = "https://<tenant>.api.crm.dynamics.com/api/data/v8.1"
   in
       Source

 

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


Update All Other Queries

let
Source = OData.Feed(CRMServiceURL),

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 6 members 1,128 guests
Please welcome our newest community members: