Understanding query parameters
One of the most valuable features is the ability to define query parameters. We can then use defined query parameters in various cases. For instance, we can create a query referencing a parameter to retrieve data from different datasets, or we can parameterize filter rows. With query parameters, we can parameterize the following:
- Data Source
- Filter Rows
- Keep Rows
- Remove Rows
- Replace Rows
In addition, we can load the parameters' values into the data model so that we can reference them from measures, calculated columns, calculated tables, and report elements if necessary.
We can easily define a query parameter from Power Query Editor, as follows:
- Click Manage Parameters.
- Click New.
- Enter a name.
- Type in some informative description that helps the user to understand the purpose of the parameter.
- Ticking the Required box makes the parameter mandatory.
- Select a type from the drop-down list...