Sassenheim, may 2, 2019

Parameters in Power Bi are a very powerfull way of making your report more dynamic. Parameters can then be applied at various places in the tool, for example, you can use parameters to apply filters to data. Another application that I find very useful is that you can use parameters to connect to different databases. By doing this through parameters you can, for example, make data accessible in an entire DTAP street with one report. This is very usefull when assessing the quality of data in different databases or when rolling out a new report.

To do this, proceed as follows:

1. Go to powerquery and select Manage Parameters > New parameter to add a new parameter.

2. Create two new parameters, one for the server address and one for the database name. Use type Text and a list of values.

3. Use these parameters with every new query that gets data from one of these databases. If you have already connected to these databases you can switch over to the parameters by selecting Data source settings > Change source and applying the parameters to server and database.

After these three steps, the report is set up to connect to different servers and databases. To load data from another database you have to change the parameters of the report.

1. Change the parameters in Power BI desktop by selecting Edit Queries > Edit parameters

2. In the next screen you can select a different server and database. After pressing OK you have to refresh the report to make the new data available from the newly connected server and database.

Power BI Service

If publish the report to the Power BI service you can still change the parameter. You do this by navigating to the data set settings of the report. You can find the parameters among the other settings. You cannot choose from the entered list, you need to edit the text directly. Once changed, you need to refresh the data set to make the data available in the report.