Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedJoin us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now
As I am sure a lot of people noticed if you now go into the settings of your dataset there is an additional option which says Parameters.
What I wanted to test out was to see if I could change the connection strings using the Parameters in the Power BI Service. The advantages of this working in my opinion is the following:
One thing to take note of, is that this currently only works on Imported data sources and not DirectQuery or LiveConnection
What I did in order to test the changing of the connection strings is I created 2 Sample Azure SQL databases. Not only was this very quick to complete, it was also extremely cheap with it costing $6.99 AUD per month for me test my solution. As part of the installation I installed the Adventure Works databases
Then in order to ensure that I was looking at the different servers, I updated the Products table so that for the Colour Black it was changed to "Black-Svr1_DW" and "Black_Svr2_DW"
I created my Power BI Report, where I first connected to the Azure SQL Database and imported the SalesLT.Products table from Server1_DW
NOTE: As you can see above my colour has the name of "Black-Svr1_DW" I then created a second table, which runs the TSQL command @@ServerName, this is to ensure that not only could I get back the relevant server name, but that I am indeed not masking the results for this blog post (Honesty is the BEST policy )
Whilst in the Power Query Editor I then created 2 Parameters, one for the Server Name and another for the Database Name
I now wanted to modify the parameters in the Power BI Service and see if they would work as expected.
The final step was to refresh the data and see if it now was getting data from Server2_DW
As I have demonstrated there now is the flexibility within the Power BI Service to leverage the parameters in order to quickly and easily change data source connections to underlying datasets. If there are any questions or comments please leave them in the section below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.