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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Failed to save modifications to the server2 datasource reference(s)

So I'm trying to connect two different databases from SQL to Power-BI using parameters created in power-BI using direct query, when trying to do this in direct query it's giving me this error, but not when I'm doing an import. It's preferable that I use direct query to limit the filesize so I'm wondering why this is not working?

 

Here is the error 

 

1ce9a3c00467f0c878dc8082774251bc.png

here is code snippet that might help if there is some confusion.

c3bbdfc289379894b79dfa115286090a.png

1 REPLY 1
lbendlin
Super User
Super User

You have blacked out the part that is important.  It is not clear if you override the server name or the database name. 

 

(You may get away with the latter but then you should use Sql.Databases  (extra s)  which in turn is not supported in the gateway.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors