PARAMETER IN POWER BI

Vaishali
3 min readFeb 28, 2020

--

QUERY PARAMETER

  • Query Parameter features help to easily define a parameter to be used in their queries, Data model, and Report in Power BI.
  • We can define new parameters by using the Manage Parameters in the Power Query Editor window.

CREATE PARAMETER

  • In this article, We learn about how to create a parameter.
  • In the SQL Server, I have created a SAMPLE database. There are three tables that we import in Power BI through the parameter.
DATABASE
  • In Power BI desktop go to the Home tab and click on the Edit Queries.
EDIT QUERY
  • Then Power Query Editor is open. In the Power Query Editor Window go to the Home tab and select Manage Parameters.
MANAGE PARAMETER
  • Then after the new pop up window is open that is Parameters.
PARAMETERS
  • Firstly click on the New and then we provide a Name for the parameter that is a DATABASE. Also, we enter information about the parameter in Description.
  • Thereafter we specify a value for the parameter by selecting the Required checkbox.
  • Type applies a Data Type restriction to the input value for the parameter. Here we select type as text.
  • In Suggested Values, we select a list of values and enter the database names as SAMPLE.
  • In suggested value, we can restrict the entry or we provide a given parameter. Here we can get one of the available values (Any values, List of values, Query) when specifying the parameter value.
  • After that, we set the Default and Current value. The default value sets the default value for a parameter. The current value specifies the parameter’s value for the current report.
PARAMETERS
  • Click on the ok button. Then the Database parameter has been created in Left and Center Pane.
CREATE PARAMETER
  • After creating a parameter we add the tables in Power BI by using Get Data.
  • Now we provide the Server name and Database. In the database option, we select parameters. And click on the ok button.
SQL SERVER DATABASE
  • Then the Navigator pane window is open in that we can see tables of SAMPLE database which is our current value. Now we selecting these tables and load into the Power BI.
NAVIGATOR PANE
  • After that, we can see tables are imported in Power BI.
SAMPLE DATABASE TABLES

If you are new to Power BI start with the following must-watch video:-

--

--

No responses yet