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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
kdixon5490
Helper III
Helper III

How to have multiple databases defined in 1 gateway and switch reports back and forth between them?

How to have multiple databases defined in 1 gateway and switch reports back and forth between them?

 

Currently I have have several databases with the same structure on 1 server.    DB1 and DB2.   

How can set up a datasource within my gateway for each of these 2 databases and then be able to point a Powerbi Report to 1 or the other depending on my need at the moment?  I do not want to have to republish the report everytime I want to change databases.

 

Thanks in Advance.

 

3 REPLIES 3
Anonymous
Not applicable

Hi  @kdixon5490,

 

You can create parameters for Server and Database and change them in the service, this blog perfectly explains how to do it:

 

https://community.powerbi.com/t5/Community-Blog/Using-the-Power-BI-Service-Parameters-to-change-conn...

 

Regards

Thank you for help.   I am rather new to powerbi and trying to set up some stuff. 

 

I have another I did exactly what he did and have everything set up for the parameter.  I go in and enter a new database and try and refresh and it gives me an error that a gateway is not available.     I went into manage gateways and added a new datasource for the new database server combo.  I thought it would attach to that but it did not.  As you can see in the picture I have  datasources the second one in the list was the original datasource and the highlighted one is the new one.Powerbi Gateways.JPG

Anonymous
Not applicable

@kdixon5490,

Based on my test, the parameter feature in Power BI Service doesn't work for on-premises SQL server data source.  When I publish a PBIX file to Power BI Service, it is not possible to change the database parameter in Power BI Service.
1.PNG

Currently, you still need to add all the data sources of your dataset within gateway, and then set schedule refresh for the dataset. Also  make sure the connection strings you use in Power BI Desktop are same as that you use in gateway.

Regards,
Lydia

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.