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
bjordan
New Member

Query that hit multiple DBs

Hi Everyone,

 

I am new to Power BI and I am handling the administration of the Gateway online.  We created data sources by connecting to a DB in our Data Warehouse and we were able to geenrate simple dashboardboards that have worked well.

 

We have a new dashboard that is not working as it was hitting a second DB in the query on our SQL Server.  I added that DB in a separate data source on the gateway, but we are still experiencing issues.  I notice the query we are using defaults to a single DB when we set it up (which is after it connects through the gateway.)  

 

Can the query not see the other DB even if we have added it to the gateway?

 

Is there a different/proper way to write a query that hits more than one DB on the same server if the data source is limited to just one DB?

 

Thanks for any direction you can offer.

 

Bryon  

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @bjordan , The datasource detail of the gateway connection should match what you have in Power BI Desktop. Only the username and password can differ. If you are querying two databases in one sql query, you should ensure that the user you use to create the gateway connection has access to both databases. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @bjordan , The datasource detail of the gateway connection should match what you have in Power BI Desktop. Only the username and password can differ. If you are querying two databases in one sql query, you should ensure that the user you use to create the gateway connection has access to both databases. 

Tutu_in_YYC
Super User
Super User

In Power BI, you can only connect to 1 data source in 1 query at a time. But you can create a query that connects to multiple queries with different data source each.

As long as you set the new datasource in the gateway, it should work.

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 Kudoed Authors