Introduction

Query Parameters allow users to easily make parts of reports and data models based on one or more parameter values. By attaching Query Parameters to a report, the user may render the query elements based on those parameters that were generated.

Creating Parameters

Open Power Query Editor by clicking on ‘Transform data’ at the ‘Home’ tab of ‘Power BI Desktop’.

Parameters in Power BI Desktop

In the ‘Power Query Editor’ window, from the ‘Home’ tab select ‘Manage Parameters’ to bring up the ‘Parameters’ dialog, as shown below

Parameters in Power BI Desktop

Parameters in Power BI Desktop

The new ‘Manage Parameters’ dialog will open and it contains the following elements that allow you to build new parameters

Let see how to create a parameter. I described all the above terms, so now I mention all these fields into the ‘Manage Parameter’ window.

Here, I am creating the parameter for the database that will be used to add database tables in Power BI. We have multiple databases in our SQL server, so we will connect our database through parameters.

You can check my article on connecting SQL server in Power BI.

Now I am providing the values of the above segments.

Parameters in Power BI Desktop

Click the OK button and we can see that the parameter Database has been generated, which is shown in the Left Pane and also in the Center Pane.

Parameters in Power BI Desktop

Summary

I hope you understood how you can create a parameter. In the next article, I will show you how to use this parameter to import the database table, so stay with me and wait for the next article. Thanks for reading.