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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
amerlin
New Member

Change Sql Connection

Hi,

I Power Bi Stat and I use a Source Connection with some table.

Now I need use my stat with other Sql Server (but table structure are the same).

Ho I can connect my stat to new Sql Server?

I try to change Connection, but table point to old server.

Thanks

1 ACCEPTED SOLUTION
pmouseca
Regular Visitor

Hi Amerilin,

 

Once you build a connection (aka "Query"), you can go to the queries editor by hitting the "Edit Queries" button in the ribbon, then you'll see that query with a list of operations that you did.

 

You can switch the query's source by editing its source step

Forum1.PNG

 

Similarily, you can change the database by double clicking on the Navigation step.

 

Regards,

PQ

View solution in original post

2 REPLIES 2
pmouseca
Regular Visitor

Hi Amerilin,

 

Once you build a connection (aka "Query"), you can go to the queries editor by hitting the "Edit Queries" button in the ribbon, then you'll see that query with a list of operations that you did.

 

You can switch the query's source by editing its source step

Forum1.PNG

 

Similarily, you can change the database by double clicking on the Navigation step.

 

Regards,

PQ

Bjoern
Continued Contributor
Continued Contributor

Please go to the Power BI desktop application, open the query part and click on "Advanced Editor" within a query.

 

You should be able to see something like this:

let
Source = Sql.Databases("YOURSERVERNAME.database.windows.net"),
YOURSERVERNAME= Source{[Name="YOURDATABASENAME"]}[Data],
Schema_TableName = YOURDATABASENAME{[Schema="scheme",Item="TableName"]}[Data]
in
Schema_TableName

 

Could you please share this? Try to replace the strings with the new servername.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.