Add Dashboard Parameters and Filter Data
- 5 minutes to read
This topic explains how to create a dashboard parameter and use it to filter dashboard items and data at the data source level.
Create a Dashboard Parameter
Follow the steps below to create a dashboard parameter.
Invoke the dashboard menu and select Parameters.
In the Parameter List section, click Add New Parameter.
Specify the parameter’s settings:
Parameter Settings
The following settings are available for dashboard parameters:
Settings | Description |
---|---|
Name | Specifies the parameter name. This name is used to refer to the parameter in the filter expression. |
Description | Specifies the parameter description displayed in the Parameter column of the Dashboard Parameters dialog. |
Visible | Specifies whether the parameter is visible in the Dashboard Parameters dialog. |
Allow Null | Specifies whether a null value can be passed as a parameter value. |
Allow Multiselect | Specifies whether multi-selection is enabled for the parameter. |
Select All Values | Specifies whether all parameter values should be selected in the initial state of the dashboard. Note that this option is in effect when Allow Multiselect is enabled. |
Type | Specifies the parameter type. |
Default Value | Specifies the default parameter’s value. |
Look-Up Settings | Specifies the parameter look-up settings. |
Depending on the selected Look-up Settings option, specify the following settings:
- No Look-Up
- A user specifies the parameter value in the Dashboard Parameters dialog.
- Static List
- A user selects a parameter value from a static list. To add predefined parameter values, use the + button.
- Dynamic List
A user selects a parameter value defined in a data source. To get access to data source values, specify the following options:
Settings Description Data Source Specifies the data source for the dashboard parameter. Data Member Specifies the name of the data member with the parameter values. Value Member Specifies the name of the data field for the parameter values. Display Member (optional) Specifies the name of the data field used for parameter value descriptions displayed in the Dashboard Parameters dialog. Sort By and Sort Order (optional) Allows you to specify the data member used to sort parameter values and the required sort order.
Filter a Dashboard Item
Filters that are applied to a dashboard item affect only this item.
To filter an individual dashboard item, follow the steps below:
In the Dashboard Item Menu, invoke the Filters menu. In the Item Filter section, click the Edit button to add a filter:
In the invoked Filter Editor, specify filter criteria.
The following images display an expression where the SalesPerson data field is compared to the SalesPerson parameter’s value. To compare the field and parameter value, expand the drop-down menu for a value placeholder and select Parameter.
This converts the value placeholder into a parameter placeholder. Click this placeholder and select the created dashboard parameter.
To change the parameter’s value, click the Dashboard Parameters button in the dashboard title to invoke the Dashboard Parameters dialog. Select the parameter value and click Submit to pass the corresponding value to the filter expression.
Filter a SQL Query
To filter dashboard data at the data source level, follow the steps below:
On the Data Sources page, select a data source. Click the Edit button for the query that you want to filter.
In the invoked Dashboard Data Source Wizard dialog, click Run Query Builder.
In the Query Builder, switch to the Query Properties section and click the ellipsis button for the Filter property. In the invoked Filter Editor, construct an expression.
The image below displays an expression in which the SalesPerson data field is compared to a query parameter value. Expand the dropdown menu for a value placeholder and select Parameter. Click the converted placeholder and select Create new parameter.
In the dedicated field, specify the query parameter name.
Click OK to save the filter condition and close the editor.
Click OK in the Query Builder, and then, click Next on the wizard page to proceed.
On the following Data Source Wizard page, bind the created query parameter to the dashboard parameter. In the parameter’s Type field, select Expression. Click the ellipsis button for the Value property.
In the invoked Expression Editor, specify the dashboard parameter. Click OK to save the settings.
Click Finish to exit the wizard.
Select the parameter value in the Dashboard Parameters panel and click Submit to filter the dashboard.
Create a Multi-Value Parameter
You can create a multi-value dashboard parameter.
To enable a dashboard parameter to accept multiple values, check the parameter’s Allow Multiselect option in the parameter’s settings:
Now you can use the created parameter to filter a dashboard item or a data source. For this, use Is any of or Is none of operators in the filter expression.
The image below shows how to customize the filter expression created earlier so that the SalesPerson data field is compared to all dashboard parameter values.
Open the Dashboard Parameters dialog and select one or more values in the parameter’s look-up editor. Click Submit to pass the corresponding values to the filter expressions.
User-Specific Functions
The Report and Dashboard Server has functions that allow you to access information about the current user. For more information, refer to the following topic: User-Specific Functions.