diff --git a/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters.md b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters.md index 3c2b616b82..8dd5dfa586 100644 --- a/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters.md +++ b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters.md @@ -1,12 +1,13 @@ --- -title: Using Dashboard Parameters +title: Use Dashboard Parameters author: Natalia Kazakova legacyId: 16521 --- -# Using Dashboard Parameters +# Use Dashboard Parameters You can use **dashboard parameters** when it is necessary to pass data of a certain type to a dashboard (e.g., to pass a specific value to the data source filter string or a calculated field). The topics in this section describe how to use dashboard parameters. -* [Creating Parameters](using-dashboard-parameters/creating-parameters.md) -* [Passing Parameter Values](using-dashboard-parameters/passing-parameter-values.md) -* [Requesting Parameter Values](using-dashboard-parameters/requesting-parameter-values.md) \ No newline at end of file +* [Create Dashboard Parameters](using-dashboard-parameters/creating-parameters.md) +* [Create Cascading Parameters](using-dashboard-parameters/create-cascading-parameters.md) +* [Reference Dashboard Parameters](using-dashboard-parameters/passing-parameter-values.md) +* [Specify Parameter Values](using-dashboard-parameters/requesting-parameter-values.md) \ No newline at end of file diff --git a/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/create-cascading-parameters.md b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/create-cascading-parameters.md new file mode 100644 index 0000000000..a935267530 --- /dev/null +++ b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/create-cascading-parameters.md @@ -0,0 +1,63 @@ +--- +title: Cascading Parameters +author: Polina Tuyreva +--- +# Cascading Parameters + +Create cascading parameters to filter a list of predefined parameter values based on another parameter's values. The following image illustrates cascading parameters where the **pProducts** parameter values are filtered by the selected category: + +![Dashboard for WinForms - Cascading Parameters](../../../../images/cascading-parameters-winforms.gif) + +In case of two parameters, the first parameter is used to filter the data source for the second parameter with [dynamic list](creating-parameters.md#dynamic-list) settings. + +## Create Cascading Parameters + +The dashboard in this example is connected to a Northwind database (an SQL Database) and contains three [queries](../../work-with-data/manage-sql-queries.md): *Categories*, *Products*, and *OrderReports*. The Grid item visualizes data from the *OrderReports* query. + +In this tutorial, you will create two dashboard parameters: +* The **pCategory** parameter filters the *Products* query. The *Products* query is a data source for the **pProducts** parameter. +* The **pProducts** parameter filters the *OrderReports* query. + +The steps below create cascading parameters in the WinForms Dashboard Designer: + +1. Create a dashboard parameter called **pCategory** with dynamic list settings. Use the *Categories* query as a data member and the *CategoryID* as a value member. + + The parameter settings may look as follows: + + ![Dashboard for WinForms - Create Dashboard Parameter](../../../../images/category-parameter-cascading.png) + +2. Use the created **pCategory** parameter to [filter](../../work-with-data/filter-queries.md) the *Products* query. + + To do this, invoke the [Query Builder](../../work-with-data/using-the-query-builder.md) and click the **Filter...** button to specify the filter criteria in the **Filter Editor**. Choose the **Bind To** option to automatically bind a [query parameter](../../work-with-data/pass-query-parameters.md) to the created dashboard parameter: + + ![Dashboard for WinForms - Filter Query](../../../../images/category-parameter-filter-cascading.png) + + The resulting query looks as follows: + + ``` + [Products.CategoryID]=?pCategory + ``` + +3. Create a dashboard parameter called **pProducts** with dynamic list settings. Use the *Products* query as a data member and the *ProductID* as a value member. + + The parameter settings may look as follows: + + ![Dashboard for WinForms - Create Dashboard Parameter](../../../../images/products-parameter-cascading.png) + + +4. Use the **pProducts** dashboard parameter to filter the *OrderReports* query. + + To do this, invoke the [Query Builder](../../work-with-data/using-the-query-builder.md) and click the **Filter...** button to specify the filter criteria in the **Filter Editor**. Choose the **Bind To** option to automatically bind a [query parameter](../../work-with-data/pass-query-parameters.md) to the created dashboard parameter: + + ![Dashboard for WinForms - Filter Queries](../../../../images/products-parameter-filter-cascading.png) + + The resulting query looks as follows: + + ``` + [OrderReports.ProductID] In ?pProducts + ``` + +5. Create a Grid item to visualize data from the filtered *OrderReports* query. + +>[!TIP] +>When using a [multi-value](creating-parameters.md#allow-multiselect) parameter to filter a query, create the condition with the `Is any of` or `Is none of` operator. diff --git a/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/creating-parameters.md b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/creating-parameters.md index 3d92f1d0b9..abefdc6254 100644 --- a/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/creating-parameters.md +++ b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/creating-parameters.md @@ -1,64 +1,139 @@ --- -title: Creating Parameters +title: Create a Dashboard Parameter author: Natalia Kazakova legacyId: 16522 --- -# Creating Parameters -This topic explains how to create a new dashboard parameter and specify its settings. -* [Creating Parameters in the Dashboard Designer](#creating-parameters-in-the-dashboard-designer) -* [Look-Up Editor Settings](#look-up-editor-settings) - -## Creating Parameters in the Dashboard Designer -To create dashboard parameters in the Dashboard Designer, do the following: -1. Click the **Parameters** button on the Ribbon's **Data Source** tab. +# Create a Dashboard Parameter in the WinForms Designer + +This topic shows how to add a new dashboard parameter and specify its settings in the Dashboard Designer. + +## Create a Parameter in the UI + +To create dashboard parameters in the Dashboard Designer, follow the steps below. + +1. Click the **Parameters** button from the **Dashboard** page group on the Ribbon's **Home** page. - ![Parameters_AddParameterButton_Ribbon](../../../../images/img21711.png) -2. In the invoked dialog, click the **Add** button to add a new parameter. + ![Ribbon - Parameters Button](../../../../images/parameters_addparameterbutton_ribbon21711.png) + +2. In the invoked dialog, click the **Add** button to create a dashboard parameter. - ![Parameters_ParametersDialog](../../../../images/img21716.png) -3. Specify the following settings. - * **Visible** - Specifies whether or not the parameter editor is visible in the [Dashboard Parameters](requesting-parameter-values.md) dialog. - * **Allow Null** - Specifies whether or a not null value can be passed as a parameter value. - * **Allow Multiselect** - Specifies whether or not multi-selection is enabled for the current parameter. The following limitations are applied to parameters with multi-selection enabled. - * Use the **is any of** or **is none of** operators to pass a multi-select parameter to a [filter](../../data-shaping/filtering.md) criteria or to the [Expression](../../appearance-customization/conditional-formatting/expression.md) format condition. - * Use the **In** or **Not In** operators to pass a multi-select parameter to a [calculated field](../../work-with-data/creating-calculated-fields.md) expression. - * Stored procedures used in the [SQL](../../work-with-data/stored-procedures.md) data source do not support multi-select parameters. - * **Name** - Specifies the parameter name. When creating and modifying parameter names, follow the rules below. - * A name can contain letters, numbers and underscores. - * A name cannot contain spaces. - * A name cannot be an empty string. - * The dashboard cannot contain parameters with the same name. - * Names are case-sensitive. For example, you can create the names _Parameter_ and _PARAMETER_ . - * **Description** - Specifies the parameter's description. The parameter's description is the value displayed in the **Parameter Name** column of the [Dashboard Parameters](requesting-parameter-values.md) dialog. - * **Look-Up Settings** - Specifies the parameter's [look-up editor settings](#look-up-editor-settings). - * **Select All Values** - Specifies whether or not all parameter values should be selected in the initial state of the Dashboard Viewer. - - Note that this option is in effect when **Allow Multiselect** is set to **true**. - * **Type** - Specifies the parameter type. - * **Value** - Specifies the default parameter’s value. Note that when **Allow Multiselect** is set to **true**, the **Value** option allows you to select multiple parameter values. + ![Dashboard Parameters Dialog - Add Parameters](../../../../images/parameters_parametersdialog21716.png) + +3. Specify the parameter's settings and click **OK** to save the created parameter. + +## Parameter Settings + +### Name + +Specifies the parameter name. + +When you create and modify parameter names, follow the rules below: + +* A name can contain letters, numbers, and underscores. +* A name cannot contain spaces. +* A name cannot be an empty string. +* The dashboard cannot contain parameters with the same name. +* Names are case-sensitive. For example, you can create the names _Parameter_ and _PARAMETER_ . + +### Description + +Specifies the parameter description displayed in the **Parameter** column of the [Dashboard Parameters](requesting-parameter-values.md) dialog. + +![Dashboard Parameters Dialog - Parameter Description](../../../../images/dashboard-parameter-description-win.png) - Then, click **OK** to add the created parameters to the dashboard. +### Visible + +Specifies whether the parameter is visible in the [Dashboard Parameters](requesting-parameter-values.md) dialog. -## Look-Up Editor Settings -There are three types of look-up editor settings that can be specified for a parameter. Select the required type from the **LookUpSettings** drop-down list. +### Allow Null -![Parameters_ParametersDialog_LookUpSettings](../../../../images/img21718.png) -* **No Look-Up** - set the **Value** to use a static value as a parameter. +Specifies whether a null value can be passed as a parameter value. - ![Parameters_LookUpSettings_NoLookUp](../../../../images/img21722.png) -* **Static List** - click the ellipsis button to add static values for the current dashboard parameter. +### Allow Multiselect + +Specifies whether multi-selection is enabled for the current parameter. + +The following limitations apply to parameters with multi-selection enabled: + +* Use the **Is any of** or **Is none of** operators to pass a multi-select parameter to a filter criteria or to the Expression format condition. +* Use the **In** or **Not In** operators to pass a multi-select parameter to a calculated field expression. + +### Select All Values + +Specifies whether all parameter values should be selected in the initial state of the dashboard. - ![Parameters_LookUpSettings_Static](../../../../images/img21723.png) +Note that this option is in effect when **Allow Multiselect** is enabled. + +### Type + +Specifies the parameter type. + +The following types are available: +* String +* Date +* Number (16-bit integer) +* Number (32-bit integer) +* Number (64-bit integer) +* Number (floating point) +* Number (double-precision floating point) +* Number (decimal) +* Boolean +* GUID (Globally Unique Identifier) + +### Value + +Specifies the default parameter value. + +Note that when the **Allow Multiselect** option is enabled, the **Value** option allows you to select multiple parameter values. + +### Look-Up Settings + +Specifies the parameter's look-up settings. + - In this case, the **Value** specifies the default parameter's value. -* **Dynamic List** - allows you to use a list of values from the existing data source as a parameter. You need to select the required **Data Source** from the list of available data sources and data members for the dashboard parameter's display name and value, respectively. +Select the option from the **Look-Up Settings** drop-down list. + +![Parameters Dialog - Look-Up Settings](../../../../images/parameters_parametersdialog_lookupsettings21718.png) + +The following **Look-Up Settings** are available in the WinForms Dashboard: + +#### No Look-Up + +An end user can specify the parameter value in the [Dashboard Parameters](requesting-parameter-values.md) dialog. + +You can set the default value for the parameter in the parameter setting: + +![Dashboard Parameter Look-Up Settings - No Look-Up](../../../../images/parameters_lookupsettings_nolookup21722.png) + +#### Static List + +An end user selects a parameter value from a static list. + +To add predefined parameter values, click the ellipsis button in the parameter settings: - ![Parameters_LookUpSettings_Dynamic](../../../../images/img21842.png) - 1. First, select the required **Data Source** from the list of available data sources. For the [SQL](../../provide-data/connecting-to-sql-databases.md) data source, select the required **Data Member** that specifies the query from the selected **Data Source**. - 2. Then, specify data members for the dashboard parameter's value and display name using **Value Member** and **Display Member**, respectively. - 3. If necessary, specify the data member used to sort parameter values using the **Sort By** option. **Sort Order** specifies the required sort order. +![Dashboard Parameters Look-Up Settings - Static List](../../../../images/parameters_lookupsettings_static21723.png) + + +#### Dynamic List + +An end user selects a parameter value defined in a data source. - > [!NOTE] - > To learn how to create a data source for a dashboard parameter, see [Provide Data](../../provide-data.md). - > - > Note that you cannot specify an [OLAP](../../provide-data/connecting-to-olap-cubes.md) data source as the data source for the dashboard parameter in the Dashboard Designer. \ No newline at end of file +![Dashboard Parameters Look-Up Settings - Dynamic List](../../../../images/parameters_lookupsettings_dynamic21842.png) + +>[!TIP] +>You can also create cascading parameters in the Dashboard Designer. For more information, refer to the following topic: [Cascading Parameters](create-cascading-parameters.md). + +To provide access to data source values, specify the following options: + +|UI 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 for SQL and Entity Framework data sources.| +|**Value Member**|Specifies the name of the data field for the parameter values.| +|**Display Member** (optional)| Specifies the name of the data field displayed in the **Dashboard Parameters** dialog as a value description.| +|**Sort By** (optional)|Specifies the data member used to sort parameter values.| +|**Sort Order** (optional)|Specifies the sort order.| + +> [!NOTE] +> You cannot use an OLAP data source as the data source for a dashboard parameter. + diff --git a/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/passing-parameter-values.md b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/passing-parameter-values.md index 766fafa26c..a74ace0f96 100644 --- a/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/passing-parameter-values.md +++ b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/passing-parameter-values.md @@ -1,48 +1,92 @@ --- -title: Passing Parameter Values +title: Reference Dashboard Parameters author: Natalia Kazakova legacyId: 16523 --- -# Passing Parameter Values -In this topic, you will learn how to pass parameter values to a dashboard. -* [SQL Queries](#sql-queries) -* [Filtering](#filtering) -* [Conditional Formatting](#conditional-formatting) -* [Calculated Fields](#calculated-fields) -* [Window Calculations](#window-calculations) - -## SQL Queries -The Dashboard Designer provides the capability to use a dashboard parameter as an SQL query/stored procedure parameter. To pass a dashboard parameter to an [SQL query](../../work-with-data/pass-query-parameters.md)/[stored procedure](../../work-with-data/stored-procedures.md) in the [Data Source](../../provide-data/connecting-to-sql-databases.md) wizard or [Query Editor](../../work-with-data/using-the-query-editor.md), do the following. -* Create a [query parameter](../../work-with-data/pass-query-parameters.md) or select the required [stored procedure](../../work-with-data/stored-procedures.md) parameter. -* Enable the **Expression** checkbox for this parameter and select the required dashboard parameter in the **Value** column. - - ![QueryEditor_PassDashboardParameter](../../../../images/img121219.png) +# Reference Dashboard Parameters in WinForms + +This topic describes how to reference a [dashboard parameter](creating-parameters.md) in [condition format expressions](#conditional-formatting), [calculated fields](#calculated-fields), and [window calculations](#window-calculations). You can also bind a dashboard parameter to a query parameter to filter the SQL data source dynamically. + +## SQL Queries and Stored Procedures +You can filter the SQL data sources dynamically if you bind a [query parameter](../../work-with-data/pass-query-parameters.md) to a dashboard parameter. + +You can access the query parameter settings in the second page of the [Query Editor](../../work-with-data/using-the-query-editor.md) or in the [Query Builder](../../work-with-data/using-the-query-builder.md) by clicking the **Edit Parameters** button. + +Select the *Expression* checkbox and in the **Value** column, select the dashboard parameter, or specify an expression with a dashboard parameter in **Expression Editor**. - If necessary, you can select **Expression editor...** and specify an [expression](../../data-analysis/expression-constants-operators-and-functions.md) to bind a query parameter to a dashboard parameter using custom logic. +![Query Editor - Configure Query Parameters](../../../../images/queryeditor_passdashboardparameter121219.png) + +Refer to the following article for more information about query parameters: [Use Query Parameters](../../work-with-data/pass-query-parameters.md). + +>[!TIP] +>You can also create cascading parameters in the WinForms Dashboard Designer. For more information, refer to the following topic: [Cascading Parameters](create-cascading-parameters.md). + +## Data Source Filtering + +You can use dashboard parameters to filter Excel, Object, and Extract data sources. + +To apply filtering to a data source, click the **Filter** button in the **Data Source** Ribbon tab. + +![Data Source Filter Button](../../../../images/datasourcefiltering_filterbutton_ribbon22300.png) + +In the invoked [Filter Editor](../../../../../interface-elements-for-desktop/articles/filter-editor/filter-data-via-the-filter-editor.md), specify the filter criteria. To compare a field value with a parameter value, click the ![Parameters_FilterEditor_CompareButton](../../../../images/parameters_filtereditor_comparebutton21820.png) button and then the ![Parameters_FilterEditor_CompareButton2](../../../../images/parameters_filtereditor_comparebutton221824.png) button. Then, click the second operand's placeholder to invoke the list of available parameters and select the required parameter: + +![Data Source Filtering - Filter Criteria with a Parameter](../../../../images/filter-ds-parameterpselection-win.png) + +The ![Parameters_FilterEditor_CompareButton3](../../../../images/parameters_filtereditor_comparebutton321825.png) icon will be displayed next to the selected parameter. + +Click **OK** to save the created filter criteria. Now, when you change the dashboard parameter value, the data source is filtered according to the parameter value. + +## Conditional Formatting + +You can apply [conditional formatting](../../appearance-customization/conditional-formatting.md) to a dashboard item according to the current parameter value. It allows you to format dashboard item elements dynamically. + +To reference a dashboard parameter in a [format rule](../../appearance-customization/conditional-formatting.md#create-and-edit-a-format-rule), click the menu button of the required data item and select **Add Format Rule | Expression**: + +![Format Rule - Expression Type](../../../../images/win-conditional-formatting-expression.png) + +In the invoked **Expression** dialog, specify the format rule and other settings. To compare a field value to a parameter value, click the ![Filter Editor - Button](../../../../images/parameters_filtereditor_comparebutton21820.png) button of the second operand, and then click the ![Filter Editor - Button](../../../../images/parameters_filtereditor_comparebutton221824.png) button. After that, click the operand's placeholder and select the dashboard parameter. + +![Expression Dialog -Compare to a Dashboard Parameter](../../../../images/expressiondialog_passparameter121501.png) + +The ![Parameters_FilterEditor_CompareButton3](../../../../images/parameters_filtereditor_comparebutton321825.png) icon will be displayed next to the selected parameter. + +Click **OK** to save the created format rule. Now, when you change the dashboard parameter value, the dashboard item is formatted according to the parameter value. + +>[!TIP] +>For more information on conditional formatting, refer to the following article: [Conditional Formatting](../../appearance-customization/conditional-formatting.md). + + +## Calculated Fields + +You can use parameters when you construct [expressions](../../data-analysis/expression-constants-operators-and-functions.md) for [calculated fields](../../work-with-data/creating-calculated-fields.md). This allows you to dynamically evaluate values of the calculated field depending on the current parameter value. + +To reference a dashboard parameter in the calculated field expression, add or edit a calculated field. In the invoked **Expression Editor**, select the dashboard parameter from the **Parameters** section. + +![Parameters_CalculatedFields](../../../../images/parameters_calculatedfields21730.png) + +Click **OK** to save the expression. Now, when you change the dashboard parameter value, the calculated field values are changed according to the specified expression. + +>[!TIP] +>For more information on calculated fields in WinForms Dashboard, refer to the following article: [Calculated Fields](../../work-with-data/creating-calculated-fields.md). -## Filtering -You can filter the specified [query](../../work-with-data/filter-queries.md) of the [SQL Data Source](../../provide-data/connecting-to-sql-databases.md) or [apply filtering](../../data-shaping/filtering.md) to a specific dashboard item according to the current parameter value(s) using the [Filter Editor](../../../../../interface-elements-for-desktop/articles/filter-editor.md). +## Window Calculations -In the Filter Editor, you can compare a field value with the following objects. -* _A static value_ (represented by the ![Parameters_FilterEditor_CompareButton](../../../../images/img21820.png) icon). Click this button to switch to the next item mode ("another field value"), to compare the field value with another field value. -* _Another field value_ (represented by the ![Parameters_FilterEditor_CompareButton2](../../../../images/img21824.png) icon). Click this button to switch to the next item mode (“parameter value”), to compare the field value with a parameter value. -* _A parameter value_ (represented by the ![Parameters_FilterEditor_CompareButton3](../../../../images/img21825.png) icon). Click this button to switch back to the initial mode ("static value"), to compare the field value with a static value. +You can use dashboard parameters in [window calculations](../../data-analysis/window-calculations/window-calculations-overview.md). This allows you to apply specific computations to measure values depending on the current parameter value. -Thus, to compare a field value with a parameter value, click the ![Parameters_FilterEditor_CompareButton](../../../../images/img21820.png) button, then click the ![Parameters_FilterEditor_CompareButton2](../../../../images/img21824.png) button. +To reference the dashboard parameter value in a window calculation, create a window calculation of the **Custom** type: -![Parameters_FilterEditor](../../../../images/img21729.png) +![Data Item Menu - Custom Calculation](../../../../images/win-custom-window-calculation.png) -## Conditional Formatting -You can apply conditional formatting to a specific dashboard item according to the current parameter value when creating the [Expression](../../appearance-customization/conditional-formatting/expression.md) format condition. In the **Expression** dialog, you can compare a field value with parameter values in the same manner as in the **Filter Editor** dialog. +Then, select the calculation type and click the **Edit in Expression Editor** button: -## Calculated Fields -You can use parameters when constructing expressions for [calculated fields](../../work-with-data/creating-calculated-fields.md). This allows you to dynamically evaluate values of the calculated field depending on the current parameter value. +![Customize Calculation Window](../../../../images/customize-calculation-edit-button.png) -To include the required parameter in the calculated field expression, click **Parameters** in the Expression Editor dialog and double-click the required parameter. +In the invoked **Expression Editor** window, construct an expression. To reference a dashboard parameter, select the **Parameters** category and double-click the required parameter from the list of the available dashboard parameters. -![Parameters_CalculatedFields](../../../../images/img21730.png) +![Window Calculation with Dashboard Parameters](../../../../images/passingparameters_windowcalculation124377.png) -## Window Calculations -You can use parameters when customizing expressions for [window calculations](../window-calculations.md). This allows you to apply a calculation dynamically, depending on the current parameter value. +Click **OK** to apply the specified settings. Now, when you change the dashboard parameter value, the calculation values are changed according to the specified expression. -![PassingParameters_WindowCalculation](../../../../images/img124377.png) \ No newline at end of file +>[!TIP] +>For more information on window calculations in WinForms Dashboard, refer to the following article: [Window Calculations](../../data-analysis/window-calculations.md). diff --git a/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/requesting-parameter-values.md b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/requesting-parameter-values.md index bce88747cb..8943e3a1ef 100644 --- a/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/requesting-parameter-values.md +++ b/dashboard-for-desktop/articles/dashboard-designer/data-analysis/using-dashboard-parameters/requesting-parameter-values.md @@ -1,15 +1,17 @@ --- -title: Requesting Parameter Values +title: Specify Dashboard Parameter Values + author: Natalia Kazakova legacyId: 16524 --- -# Requesting Parameter Values -The dashboard provides a built-in **Dashboard Parameters** dialog, which provides the capability to change dashboard parameter values. This dialog is created automatically, depending on the parameter type and visibility settings. +# Specify Dashboard Parameter Values + +The Dashboard Designer includes a built-in **Dashboard Parameters** dialog, which allows users to change dashboard parameter values. This dialog is created automatically depending on the [parameter settings](creating-parameters.md#parameter-settings). Set the [Visible](creating-parameters.md#visible) property to `true` to display the parameter in the **Dashboard Parameters** dialog. -To invoke the **Dashboard Parameters** dialog in the Dashboard Designer, click the **Parameters** (![Parameters_ParametersButtonWin_Title](../../../../images/img21814.png)) button in the [dashboard title](../../dashboard-layout/dashboard-title.md). Depending on the visibility state of the [created](creating-parameters.md) dashboard parameters, this invokes the following dialog. +To invoke the **Dashboard Parameters** dialog, click the **Parameters** button in the dashboard title. Change the parameter values in the **Dashboard Parameters** dialog and click the **Submit** button to apply the changes. -![Parameters_DashboardParametersDialog_Win](../../../../images/img21815.png) +The following image shows how to invoke the **Dashboard Parameters** dialog and change the parameter value: -Select the required parameter values in the **Dashboard Parameters** dialog and click the **Submit** button to apply the changes. +![Dashboard Parameters Dialog in WinForms](../../../../images/dashboard-parameters-dialog-win.gif) -To reset the changes to the default values, click the **Reset** button. \ No newline at end of file +To reset changes to the default values, click the **Reset** button. diff --git a/dashboard-for-desktop/images/cascading-parameters-winforms.gif b/dashboard-for-desktop/images/cascading-parameters-winforms.gif new file mode 100644 index 0000000000..59940a7a2e Binary files /dev/null and b/dashboard-for-desktop/images/cascading-parameters-winforms.gif differ diff --git a/dashboard-for-desktop/images/category-parameter-cascading.png b/dashboard-for-desktop/images/category-parameter-cascading.png new file mode 100644 index 0000000000..e7d999af80 Binary files /dev/null and b/dashboard-for-desktop/images/category-parameter-cascading.png differ diff --git a/dashboard-for-desktop/images/category-parameter-filter-cascading.png b/dashboard-for-desktop/images/category-parameter-filter-cascading.png new file mode 100644 index 0000000000..24c08e6924 Binary files /dev/null and b/dashboard-for-desktop/images/category-parameter-filter-cascading.png differ diff --git a/dashboard-for-desktop/images/customize-calculation-edit-button.png b/dashboard-for-desktop/images/customize-calculation-edit-button.png new file mode 100644 index 0000000000..c5e56c5d49 Binary files /dev/null and b/dashboard-for-desktop/images/customize-calculation-edit-button.png differ diff --git a/dashboard-for-desktop/images/dashboard-parameter-description-win.png b/dashboard-for-desktop/images/dashboard-parameter-description-win.png new file mode 100644 index 0000000000..95df4d2e4c Binary files /dev/null and b/dashboard-for-desktop/images/dashboard-parameter-description-win.png differ diff --git a/dashboard-for-desktop/images/dashboard-parameters-dialog-win.gif b/dashboard-for-desktop/images/dashboard-parameters-dialog-win.gif new file mode 100644 index 0000000000..148aa7cb7c Binary files /dev/null and b/dashboard-for-desktop/images/dashboard-parameters-dialog-win.gif differ diff --git a/dashboard-for-desktop/images/datasourcefiltering_filterbutton_ribbon22300.png b/dashboard-for-desktop/images/datasourcefiltering_filterbutton_ribbon22300.png new file mode 100644 index 0000000000..9c19233097 Binary files /dev/null and b/dashboard-for-desktop/images/datasourcefiltering_filterbutton_ribbon22300.png differ diff --git a/dashboard-for-desktop/images/expressiondialog_passparameter121501.png b/dashboard-for-desktop/images/expressiondialog_passparameter121501.png new file mode 100644 index 0000000000..a365d20f58 Binary files /dev/null and b/dashboard-for-desktop/images/expressiondialog_passparameter121501.png differ diff --git a/dashboard-for-desktop/images/filter-ds-parameterpselection-win (1).png b/dashboard-for-desktop/images/filter-ds-parameterpselection-win (1).png new file mode 100644 index 0000000000..b742b8f46b Binary files /dev/null and b/dashboard-for-desktop/images/filter-ds-parameterpselection-win (1).png differ diff --git a/dashboard-for-desktop/images/filter-ds-parameterpselection-win.png b/dashboard-for-desktop/images/filter-ds-parameterpselection-win.png new file mode 100644 index 0000000000..b742b8f46b Binary files /dev/null and b/dashboard-for-desktop/images/filter-ds-parameterpselection-win.png differ diff --git a/dashboard-for-desktop/images/parameters_addparameterbutton_ribbon21711.png b/dashboard-for-desktop/images/parameters_addparameterbutton_ribbon21711.png new file mode 100644 index 0000000000..86b82f506c Binary files /dev/null and b/dashboard-for-desktop/images/parameters_addparameterbutton_ribbon21711.png differ diff --git a/dashboard-for-desktop/images/parameters_calculatedfields21730.png b/dashboard-for-desktop/images/parameters_calculatedfields21730.png new file mode 100644 index 0000000000..fae2b0623d Binary files /dev/null and b/dashboard-for-desktop/images/parameters_calculatedfields21730.png differ diff --git a/dashboard-for-desktop/images/parameters_filtereditor_comparebutton21820.png b/dashboard-for-desktop/images/parameters_filtereditor_comparebutton21820.png new file mode 100644 index 0000000000..f14f13eeaa Binary files /dev/null and b/dashboard-for-desktop/images/parameters_filtereditor_comparebutton21820.png differ diff --git a/dashboard-for-desktop/images/parameters_filtereditor_comparebutton221824.png b/dashboard-for-desktop/images/parameters_filtereditor_comparebutton221824.png new file mode 100644 index 0000000000..edef615d90 Binary files /dev/null and b/dashboard-for-desktop/images/parameters_filtereditor_comparebutton221824.png differ diff --git a/dashboard-for-desktop/images/parameters_filtereditor_comparebutton321825.png b/dashboard-for-desktop/images/parameters_filtereditor_comparebutton321825.png new file mode 100644 index 0000000000..d00719023e Binary files /dev/null and b/dashboard-for-desktop/images/parameters_filtereditor_comparebutton321825.png differ diff --git a/dashboard-for-desktop/images/parameters_lookupsettings_dynamic21842.png b/dashboard-for-desktop/images/parameters_lookupsettings_dynamic21842.png new file mode 100644 index 0000000000..d8b4f9f9cd Binary files /dev/null and b/dashboard-for-desktop/images/parameters_lookupsettings_dynamic21842.png differ diff --git a/dashboard-for-desktop/images/parameters_lookupsettings_nolookup21722.png b/dashboard-for-desktop/images/parameters_lookupsettings_nolookup21722.png new file mode 100644 index 0000000000..5fefe78ed1 Binary files /dev/null and b/dashboard-for-desktop/images/parameters_lookupsettings_nolookup21722.png differ diff --git a/dashboard-for-desktop/images/parameters_lookupsettings_static21723.png b/dashboard-for-desktop/images/parameters_lookupsettings_static21723.png new file mode 100644 index 0000000000..7238721e8a Binary files /dev/null and b/dashboard-for-desktop/images/parameters_lookupsettings_static21723.png differ diff --git a/dashboard-for-desktop/images/parameters_parametersdialog21716.png b/dashboard-for-desktop/images/parameters_parametersdialog21716.png new file mode 100644 index 0000000000..8a17c8b908 Binary files /dev/null and b/dashboard-for-desktop/images/parameters_parametersdialog21716.png differ diff --git a/dashboard-for-desktop/images/parameters_parametersdialog_lookupsettings21718.png b/dashboard-for-desktop/images/parameters_parametersdialog_lookupsettings21718.png new file mode 100644 index 0000000000..1e65e3ffc1 Binary files /dev/null and b/dashboard-for-desktop/images/parameters_parametersdialog_lookupsettings21718.png differ diff --git a/dashboard-for-desktop/images/passingparameters_windowcalculation124377.png b/dashboard-for-desktop/images/passingparameters_windowcalculation124377.png new file mode 100644 index 0000000000..bb77fec706 Binary files /dev/null and b/dashboard-for-desktop/images/passingparameters_windowcalculation124377.png differ diff --git a/dashboard-for-desktop/images/products-parameter-cascading.png b/dashboard-for-desktop/images/products-parameter-cascading.png new file mode 100644 index 0000000000..b77dc09cc0 Binary files /dev/null and b/dashboard-for-desktop/images/products-parameter-cascading.png differ diff --git a/dashboard-for-desktop/images/products-parameter-filter-cascading.png b/dashboard-for-desktop/images/products-parameter-filter-cascading.png new file mode 100644 index 0000000000..02f950cf3a Binary files /dev/null and b/dashboard-for-desktop/images/products-parameter-filter-cascading.png differ diff --git a/dashboard-for-desktop/images/queryeditor_passdashboardparameter121219.png b/dashboard-for-desktop/images/queryeditor_passdashboardparameter121219.png new file mode 100644 index 0000000000..6bc03dc094 Binary files /dev/null and b/dashboard-for-desktop/images/queryeditor_passdashboardparameter121219.png differ diff --git a/dashboard-for-desktop/images/win-conditional-formatting-expression.png b/dashboard-for-desktop/images/win-conditional-formatting-expression.png new file mode 100644 index 0000000000..a2dc2e544b Binary files /dev/null and b/dashboard-for-desktop/images/win-conditional-formatting-expression.png differ diff --git a/dashboard-for-desktop/images/win-custom-window-calculation.png b/dashboard-for-desktop/images/win-custom-window-calculation.png new file mode 100644 index 0000000000..0a251c6cb5 Binary files /dev/null and b/dashboard-for-desktop/images/win-custom-window-calculation.png differ diff --git a/dashboard-for-desktop/toc.yml b/dashboard-for-desktop/toc.yml index 98f6080037..ad65422c29 100644 --- a/dashboard-for-desktop/toc.yml +++ b/dashboard-for-desktop/toc.yml @@ -470,14 +470,16 @@ items: href: articles/dashboard-designer/data-analysis/window-calculations/calculation-functions-reference.md - name: Window Calculation Limitations href: articles/dashboard-designer/data-analysis/window-calculations/window-calculation-limitations.md - - name: Using Dashboard Parameters + - name: Use Dashboard Parameters href: articles/dashboard-designer/data-analysis/using-dashboard-parameters.md items: - - name: Creating Parameters + - name: Create Dashboard Parameters href: articles/dashboard-designer/data-analysis/using-dashboard-parameters/creating-parameters.md - - name: Passing Parameter Values + - name: Create Cascading Parameters + href: articles/dashboard-designer/data-analysis/using-dashboard-parameters/create-cascading-parameters.md + - name: Reference Dashboard Parameters href: articles/dashboard-designer/data-analysis/using-dashboard-parameters/passing-parameter-values.md - - name: Requesting Parameter Values + - name: Specify Parameter Values href: articles/dashboard-designer/data-analysis/using-dashboard-parameters/requesting-parameter-values.md - name: Convert Dashboard Items href: articles/dashboard-designer/convert-dashboard-items.md diff --git a/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters.md b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters.md index b7ca977bf1..3b663d6959 100644 --- a/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters.md +++ b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters.md @@ -4,9 +4,11 @@ author: Natalia Kazakova legacyId: 117711 --- # Dashboard Parameters + You can use **dashboard parameters** when it is necessary to pass data of a certain type to a dashboard (e.g., to pass a specific value to the data source filter string or a calculated field). These topics describe how to use dashboard parameters. -* [Creating Parameters](dashboard-parameters/creating-parameters.md) -* [Passing Parameter Values](dashboard-parameters/passing-parameter-values.md) -* [Requesting Parameter Values](dashboard-parameters/requesting-parameter-values.md) \ No newline at end of file +* [Create Dashboard Parameters](dashboard-parameters/creating-parameters.md) +* [Create Cascading Parameters](dashboard-parameters/create-cascading-parameters.md) +* [Reference Dashboard Parameters](dashboard-parameters/passing-parameter-values.md) +* [Specify Parameter Values](dashboard-parameters/requesting-parameter-values.md) \ No newline at end of file diff --git a/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/create-cascading-parameters.md b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/create-cascading-parameters.md new file mode 100644 index 0000000000..15c406494c --- /dev/null +++ b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/create-cascading-parameters.md @@ -0,0 +1,94 @@ +--- +title: Cascading Parameters +author: Polina Tyureva +--- +# Cascading Parameters + +Create cascading parameters to filter a list of predefined parameter values based on values of another parameter. The following image illustrates cascading parameters where **Products** parameter values are filtered by the selected **Category**: + +![Dashboard for Web - Cascading Parameters](../../../../images/cascading-parameters-web.gif) + +In case of two parameters, the first parameter is used to filter the data source for the second parameter with [dynamic list](creating-parameters.md#look-up-settings) settings. + +## Create Cascading Parameters + +The dashboard in this example is connected to a Northwind database (an SQL Database) and contains three [queries](../../provide-data/working-with-sql-data-sources/manage-sql-queries.md): *Categories*, *Products*, and *OrderReports*. The Grid item visualizes data from the *OrderReports* query. + +In this tutorial, you will create two dashboard parameters: +* The **categoryDashParam** parameter filters the *Products* query. The *Products* query is a data source for the **productsDashParam** parameter. +* The **productsDashParam** parameter filters the *OrderReports* query. + +The steps below create cascading parameters in the Web Dashboard: + +1. [Create a dashboard parameter](creating-parameters.md) called **categoryDashParam** with dynamic list settings. Use the *Categories* query as a data member and the *CategoryID* field as a value member. + + The parameter settings may look as follows: + + ![|Dashboard for Web - Create Dashboard Parameter](../../../../images/web-category-parameter-cascading.png) + +2. [Filter](../../provide-data/working-with-sql-data-sources/filter-queries.md) the *Products* query. + + To do this, click the **Edit** button next to the query on the **Data Sources** page of the [dashboard menu](../../ui-elements/dashboard-menu.md). + + ![Dashboard for Web - Filter Query](../../../../images/filter-sql-query.png) + + Click **Run Query Builder** in the opened window. + + In the invoked [Query Builder](../../ui-elements/dialogs-and-wizards/query-builder.md), click the ellipsis button next to the **Filter** field in the **Query Properties** section: + + ![Dashboard for Web - Filter Query](../../../../images/web-filter-properties.png) + + + In the [Filter Editor](../../ui-elements/dialogs-and-wizards/filter-editor.md), specify the filter criteria. From the drop-down list select *Parameter* and create a new [query parameter](../../provide-data/working-with-sql-data-sources//pass-query-parameters.md) called **categoryQueryParam**: + + ![Dashboard for Web - Filter Query](../../../../images/web-category-parameter-filter-cascading.png) + + The resulting filter looks as follows: + + ``` + [Products.CategoryID] = ?categoryQueryParam + ``` + +3. [Bind](creating-parameters.md#look-up-settings) the **categoryQueryParam** query parameter to the **categoryDashParam** dashboard parameter. + + To do this, in the **Parameters** section of the [Query Builder](../../ui-elements/dialogs-and-wizards/query-builder.md) change the parameter’s type to *Expression*. Click the **Value** property’s ellipsis button to specify the dashboard parameter. + + The query parameter settings look as follows: + + ![Dashboard for Web - Query Parameter Settings](../../../../images/web-category-query-parameter-setting.png) + + +4. Create a dashboard parameter called **productsDashParam** with dynamic list settings. Use the *Products* query as a data member and the *ProductID* field as a value member. + + The parameter settings may look as follows: + + ![|Dashboard for Web - Create Dashboard Parameter](../../../../images/web-products-parameter-cascading.png) + + +5. [Filter](../../provide-data/working-with-sql-data-sources/filter-queries.md) the *OrderReports* query. + + To do this, click the **Edit** button next to the query on the **Data Sources** page of the [dashboard menu](../../ui-elements/dashboard-menu.md), then click **Run Query Builder**. In the invoked [Query Builder](../../ui-elements/dialogs-and-wizards/query-builder.md), click the ellipsis button next to the **Filter** field in the **Query Properties** section. + + In the [Filter Editor](../../ui-elements/dialogs-and-wizards/query-builder.md), specify the filter criteria. From the drop-down list select *Parameter* and create a new [query parameter](../../provide-data/working-with-sql-data-sources/pass-query-parameters.md) called **productsQueryParam**: + + ![Dashboard for Web - Filter Query](../../../../images/web-products-parameter-filter-cascading.png) + + The resulting filter looks as follows: + + ``` + [OrderReports.ProductID] In(?productsQueryParam) + ``` + +6. [Bind](creating-parameters.md#look-up-settings) the **productsQueryParam** query parameter to the **productsDashParam** dashboard parameter. + + To do this, in the **Parameters** section in the [Query Builder](../../ui-elements/dialogs-and-wizards/query-builder.md) change the parameter’s type to *Expression*. Click the **Value** property’s ellipsis button to specify the dashboard parameter. + + The query parameter settings look as follows: + + ![Dashboard for Web - Query Parameter Settings](../../../../images/web-products-query-parameter-setting.png) + + +7. Create a Grid item to visualize data from the filtered *OrderReports* query. + +>[!TIP] +>When using a [multi-value](creating-parameters.md#allow-multiselect) parameter to filter a query, create the condition with the `Is any of` or `Is none of` operator. diff --git a/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/creating-parameters.md b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/creating-parameters.md index d065ced05c..77c4513319 100644 --- a/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/creating-parameters.md +++ b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/creating-parameters.md @@ -3,31 +3,116 @@ title: Creating Parameters author: Natalia Kazakova legacyId: 117551 --- -# Creating Parameters -To create a dashboard parameter in the Web Dashboard, perform the following steps. -1. Invoke the [Dashboard Menu](../../ui-elements/dashboard-menu.md) and select **Parameters**. -2. In the **Parameter List**, click the **Add New Parameter** button. The following settings will be displayed for the created parameter. - - ![WebDashboard_Parameters_NewParameter](../../../../images/img126106.png) -3. Specify the following parameter's settings. - * **Name** - Specifies the parameter name. - * **Description** - Specifies the parameter's description. +# Create Dashboard Parameters in the Web Dashboard + +This topic shows how to add a dashboard parameter and specify its settings in the UI. + +## Create a Parameter + +To create a dashboard parameter, follow the steps below. + +1. Invoke the [dashboard menu](../../ui-elements/dashboard-menu.md) and select **Parameters**. +2. In the **Parameter List**, click the **Add** button. The parameter's settings form appears as follows: + + ![Web Dashboard - Add a New Dashboard Parameter](../../../../images/img126106.png) + +3. Specify the parameter's settings. + +## Parameter Settings + +### Name + +Specifies the parameter name. + +When you create and modify parameter names, follow the rules below: + +* A name can contain letters, numbers, and underscores. +* A name cannot contain spaces. +* A name cannot be an empty string. +* The dashboard cannot contain parameters with the same name. +* Names are case-sensitive. For example, you can create the names _Parameter_ and _PARAMETER_. + +### Description + +Specifies the parameter description displayed in the **Parameter** column of the [Dashboard Parameters](requesting-parameter-values.md) dialog: + +![Dashboard Parameter with Description](../../../../images/dashboard-parameter-description.png) + +### Visible + +Specifies whether the parameter is visible in the [Dashboard Parameters](requesting-parameter-values.md) 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 current parameter. + +* Use the **Is any of** or **Is none of** operators to pass a multi-select parameter to a filter criteria or to the Expression format condition. +* Use the **In** or **Not In** operators to pass a multi-select parameter to a calculated field expression. + +### 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 the **Allow Multiselect** setting is enabled. + +### Type + +Specifies the parameter type. Select the parameter type from the drop-down list in the **Type** field. + +The following types are available: + +* String +* Date +* Number (16-bit integer) +* Number (32-bit integer) +* Number (64-bit integer) +* Number (floating point) +* Number (double-precision floating point) +* Number (decimal) +* Boolean +* GUID (Globally Unique Identifier) + +### Default Value + +Specifies the default parameter value. + +### Look-Up Settings + +Specifies the parameter's look-up editor settings. + + +The following **Look-up Settings** are available in the Web Dashboard: + +#### No Look-Up + +An end user specifies the parameter value in the **Dashboard Parameters** dialog. + +#### Static List + +An end user selects a parameter value from a static list. To add predefined parameter values, use the plus button. - The parameter's description is the value displayed in the **Parameter Name** column of the [Dashboard Parameters](requesting-parameter-values.md) dialog. - * **Visible** - Specifies whether or not the parameter is visible in the [Dashboard Parameters](requesting-parameter-values.md) dialog. - * **Allow Null** - Specifies whether or a not null value can be passed as a parameter value. - * **Allow Multiselect** - Specifies whether or not multi-selection is enabled for the current parameter. - * **Select All Values** - Specifies whether or not all parameter values should be selected in the initial state. Note that this option is in effect when **Allow Multiselect** is set to **true**. - * **Type** - Specifies the parameter type. - * **Default Value** - Specifies the default parameter’s value. - * **Look-Up Settings** - Specifies the parameter's look-up editor settings. To learn more, see the next step. -4. Depending on the selected **Look-up Settings** option, you need to specify the following settings. - * **No Look-Up** - - Allows you to specify the required parameter value manually in the [Dashboard Parameters](requesting-parameter-values.md) dialog. - * **Static List** - - Allows you to select a parameter value defined in a static list. To add predefined parameter values, use the **+** button. - * **Dynamic List** - - Allows you to select a parameter value defined in a data source. To provide access to data source values, specify the following options. - 1. First, select the required **Data Source** from the list of available data sources. For the SQL data source, select the required **Data Member** that specifies the query/data member from the selected **Data Source**. - 2. Then, specify data members for the dashboard parameter's value and display name using **Value Member** and **Display Member**, respectively. - 3. If necessary, specify the data member used to sort parameter values using the **Sort By** option. The **Sort Order** specifies the required sort order. \ No newline at end of file +#### Dynamic List + +An end user selects a parameter value defined in a data source. + +>[!TIP] +>You can also create cascading parameters in the Web Dashboard. For more information, refer to the following topic: [Cascading Parameters](create-cascading-parameters.md). + +You can specify a data source as a source for dashboard parameter values. To provide access to data source values, specify the following options: + +|UI 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 for SQL and Entity Framework data sources.| +|**Value Member**|Specifies the name of the data field for the parameter values.| +|**Display Member** (optional)| Specifies the name of the data field displayed in the **Dashboard Parameters** dialog as a value description.| +|**Sort By** (optional)|Specifies the data member used to sort parameter values.| +|**Sort Order** (optional)|Specifies the sort order.| + +>[!NOTE] +>You cannot use an OLAP data source as the data source for a dashboard parameter. + diff --git a/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/passing-parameter-values.md b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/passing-parameter-values.md index a27749e690..54402b9e43 100644 --- a/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/passing-parameter-values.md +++ b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/passing-parameter-values.md @@ -1,56 +1,128 @@ --- -title: Passing Parameter Values +title: Reference Dashboard Parameters author: Natalia Kazakova legacyId: 117552 --- -# Passing Parameter Values -In this topic, it describes how to pass the created dashboard parameter to the dashboard. For instance, you can include a dashboard parameter to a _WHERE_ clause of the SQL query or you can filter a dashboard dynamically according to the required parameter value(s). +# Reference Dashboard Parameters -The created dashboard parameter can be used in the following scenarios: -* [SQL Queries](#query) -* [Filtering](#filtering) -* [Conditional Formatting](#formatrules) -* [Calculated Fields](#calculatedfields) -* [Window Calculations](#windowscalculations) +This topic describes how to reference a dashboard parameter in [filter strings](#dashboard-item-filters), [calculated fields](#calculated-fields), and [window calculations](#window-calculations). You can also bind a dashboard parameter to a query parameter to filter the SQL data source dynamically. -## SQL Queries -The Web Dashboard provides the capability to bind a dashboard parameter and the existing [SQL query](../../provide-data/working-with-sql-data-sources/pass-query-parameters.md)/[stored procedure](../../provide-data/working-with-sql-data-sources/stored-procedures.md) parameter. This can be useful when you need to [filter the SQL query](../../provide-data/working-with-sql-data-sources/filter-queries.md) dynamically by including the parameter value in the _WHERE_ clause. +>[!TIP] +>You can also create cascading parameters in the Web Dashboard. For more information, refer to the following topic: [Cascading Parameters](create-cascading-parameters.md). -![wdd-configure-query-param-page2](../../../../images/img124955.png) +## SQL Queries and Stored Procedures + +You can filter the SQL data sources dynamically if you bind a [query parameter](../../provide-data/working-with-sql-data-sources//pass-query-parameters.md) to a dashboard parameter. -Do the following to bind a dashboard parameter to an SQL query or stored procedure parameter in the [Dashboard Data Source Wizard](../../ui-elements/dialogs-and-wizards/dashboard-data-source-wizard.md): -* Select the existing query or stored procedure parameter, or use the **Add** button to create a new query parameter. -* Set the **Expression** as a parameter value and click the ellipsis button to invoke the Expression Editor for this parameter. -* In the Expression Editor, add the required dashboard parameter from the Parameters column. +Invoke the **Data Source Wizard** window or use the **Properties** section of the [Query Builder](../../ui-elements/dialogs-and-wizards/query-builder.md) to access the query parameter settings. Change the query parameter type to *Expression* and specify the expression with a dashboard parameter in the **Value** field: -## Filtering -You can filter the specified [query](../../provide-data/working-with-sql-data-sources/filter-queries.md) of the SQL Data Source, the entire [Excel Data Source](../../provide-data/filter-data-sources.md)/[Object Data Source](../../provide-data/filter-data-sources.md) or [apply filtering](../../data-shaping/filtering.md) to a specific dashboard item according to the current parameter value(s) using the Filter Editor. +![Query Parameter - Expression Type](../../../../images/wdd-query-parameters-complex-expression.png) -In the Filter Editor, you can compare a field value with different objects such as static values, values of another field or parameter values. To switch between values, click a down arrow glyph in the operand value placeholder to expand the list of available objects. Select the **Parameter** object to compare a field value with a parameter value. +The resulting query parameter settings may appear as follows: -![wdd-filter-editor-change-object](../../../../images/img126182.png) +![Query Parameter - Expression Type with Parameter](../../../../images/wdd-query-parameters-parameter-expression.png) -Then, click the operand value to invoke the list of available parameters and select the existing parameter or create a new one. +Refer to the following article for more information about query parameters: [Use Query Parameters](../../provide-data/working-with-sql-data-sources//pass-query-parameters.md). -![wdd-parameters-filtering](../../../../images/img126539.png) +>[!TIP] +>For information on how to filter Excel, Object, XPO, and JSON data sources, refer to the following article: [Filter Data Sources](../../provide-data/filter-data-sources.md). -## Conditional Formatting -You can apply conditional formatting to a specific dashboard item according to the current parameter value when creating the **Expression** [format condition](../../appearance-customization/conditional-formatting.md). Use this capability to format dashboard item elements dynamically, depending on the current parameter value. +## Data Source Filtering -![wdd-parameters-conditional-formatting](../../../../images/img128229.png) +The Web Dashboard allows you to filter Excel, Object, XPO, and JSON data sources dynamically if you use a dashboard parameter in the filter criteria. -To switch between values, click the down arrow glyph in the operand value placeholder to expand the list of available objects and select the **Parameter** object to create a format rule with a parameter. +To add filters to a data source, open the dashboard menu, invoke the **Data Sources** page, select a data source and click **Filter**. -## Calculated Fields -You can use parameters when constructing [expressions](../../provide-data/calculated-fields.md) for [calculated fields](../../provide-data/calculated-fields.md). This allows you to evaluate values of the calculated field dynamically depending on the current parameter value. +![Data Sources - Filter Data Source](../../../../images/filter-data-source-with-parameter.png) -![wdd-parameters-calculated-field](../../../../images/img126509.png) +In the invoked [Filter Editor](../../ui-elements/dialogs-and-wizards/filter-editor.md), build a filter expression. Click the down arrow glyph in the operand value placeholder to expand the list of available objects. Select the **Parameter** option to compare a field value with a parameter value. -To include a parameter in the expression, double-click the required parameter in the Fields pane. +![Filter Editor - Dashboard Parameters](../../../../images/filter-editor-dashboard-parameter.png) -## Window Calculations -You can use parameters when customizing expressions for [window calculations](../calculations.md). This allows you to apply a calculation dynamically, depending on the current parameter value. +To select a dashboard parameter from the list of available parameters, click the parameter operand: -![wdd-parameters-window-calculations](../../../../images/img126562.png) +![Filter Editor - Select a Dashboard Parameter](../../../../images/filter-editor-dashboard-parameter-selection.png) -To create the calculation with a parameter, select the **Custom** calculation and click **Edit**. In the invoked Expression Editor double-click the required parameter. +Click **OK** to save the created filter criteria. Now, when you change the dashboard parameter value, the data source is filtered according to the parameter value. + +## Dashboard Item Filters + +Web Dashboard allows you to use the following data filters in dashboard items: + +[Dashboard Item Filter](../../data-shaping/filtering.md#dashboard-item-filter) +: Filters individual dashboard items independently. + +[Measure Filter](../../data-shaping/filtering.md#measure-filter) +: Filters only the specified measure in the dashboard item. + +[Visible Data Filter](../../data-shaping/filtering.md#visible-data-filter) +: Hides a part of the calculated data from the view. This filter type does not filter underlying data used in calculations or intermediate level aggregations. + +To apply filtering based on a dynamic value, you need to use a dashboard parameter in a filter criteria. The following example describes how to filter a dashboard item according to a dashboard parameter value. + +To add a dashboard item filter, open the dashboard item’s **Filters** menu, go to the **Item Filter** section and click the **Edit** button: + +![Dashboard Item Menu - Filters Section](../../../../images/wdd-invoke-filter-editor124630.png) + +In the invoked [Filter Editor](../../ui-elements/dialogs-and-wizards/filter-editor.md), build a filter expression. Click the down arrow glyph in the operand value placeholder to expand the list of available objects. Select the **Parameter** option to compare a field value with a parameter value. + +![Filter Editor - Dashboard Parameters](../../../../images/filter-editor-dashboard-parameter.png) + +To select a dashboard parameter from the list of available parameters, click the parameter operand: + +![Filter Editor - Select a Dashboard Parameter](../../../../images/filter-editor-dashboard-parameter-selection.png) + +Click **OK** to save the created filter criteria. Now, when you change the dashboard parameter value, the dashboard item is filtered according to the parameter value. + +>[!TIP] +>For more information on filtering in Web Dashboard, refer to the following article: [Filtering](../../data-shaping/filtering.md). + +## Conditional Formatting + +You can apply [conditional formatting](../../appearance-customization/conditional-formatting.md) to a dashboard item according to the current parameter value. It allows you to format dashboard item elements dynamically. + +To reference a dashboard parameter in a [format rule](../../appearance-customization/conditional-formatting.md#create-a-format-rule), set the condition type to **Expression**: + +![Format Rule - Expression Type](../../../../images/expression-type-conditional-formatting.png) + +In the invoked dialog, click the **Edit** button to create a condition: + +![Format Rule - Create a Condition](../../../../images/conditional-formatting-create-expression-rule.png) + +In the invoked [Filter Editor](../../ui-elements/dialogs-and-wizards/filter-editor.md), build a filter expression. Click the down arrow glyph in the operand value placeholder to expand the list of available objects. Select the **Parameter** option to compare a field value with a parameter value. + +![Filter Editor - Dashboard Parameters](../../../../images/filter-editor-dashboard-parameter.png) + +To select a dashboard parameter from the list of available parameters, click the parameter operand: + +![Filter Editor - Select a Dashboard Parameter](../../../../images/filter-editor-dashboard-parameter-selection.png) +Click **OK** to save the created format rule. Now, when you change the dashboard parameter value, the dashboard item is formatted according to the parameter value. + +>[!TIP] +>For more information on conditional formatting in Web Dashboard, refer to the following article: [Conditional Formatting](../../appearance-customization/conditional-formatting.md). + +## Calculated Fields + +You can use parameters when you construct expressions for [calculated fields](../../provide-data/calculated-fields.md). This allows you to evaluate values of the calculated field dynamically depending on the current parameter value. + +To reference the dashboard parameter value in an expression, add or edit a calculated field. In the invoked **Edit Calculated Field** window, double-click the required parameter in the **Fields** section. + +![Edit Calculated Field - Reference a Dashboard Parameter](../../../../images/wdd-parameters-calculated-field126509.png) + +Click **Save** to save the created calculated fields. Now, when you change the dashboard parameter value, the calculated field values are changed according to the specified expression. + +>[!TIP] +>For more information on calculated fields in Web Dashboard, refer to the following article: [Calculated Fields](../../provide-data/calculated-fields.md). + +## Window Calculations + +You can use dashboard parameters in [window calculations](../../data-analysis/calculations.md). This allows you to apply specific computations to measure values depending on the current parameter value. + +To reference the dashboard parameter value in an expression, create or edit a window calculation. In the invoked **Expression Editor** window, double-click the required parameter from the **Fields** section. + +![Expression Editor - Window Calculation with Parameters](../../../../images/wdd-parameters-window-calculations126562.png) + +Click **OK** to save the created window calculation. Now, when you change the dashboard parameter value, the calculation values are changed according to the specified expression. + +>[!TIP] +>For more information on window calculations in Web Dashboard, refer to the following article: [Window Calculations](../../data-analysis/calculations.md). diff --git a/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/requesting-parameter-values.md b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/requesting-parameter-values.md index f0af394b6f..86b3dee5df 100644 --- a/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/requesting-parameter-values.md +++ b/dashboard-for-web/articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/requesting-parameter-values.md @@ -1,13 +1,17 @@ --- -title: Requesting Parameter Values +title: Specify Dashboard Parameter Values author: Natalia Kazakova legacyId: 117554 --- -# Requesting Parameter Values -The Web Dashboard provides a built-in **Dashboard Parameters** dialog, which provides the capability to change dashboard parameter values. This dialog is created automatically, depending on the parameter type and visibility settings. +# Specify Dashboard Parameter Values -![Parameters_DashboardParametersDialog_Web](../../../../images/img21818.png) +The Web Dashboard control includes a built-in **Dashboard Parameters** dialog, which allows users to change dashboard parameter values. This dialog is created automatically depending on the parameter settings. Select the **Visible** check box in the [parameter settings](creating-parameters.md#parameter-settings) to display the parameter in the **Dashboard Parameters** dialog. -To invoke the Dashboard Parameters dialog in the Web Dashboard, click the **Parameters** button (the ![Parameters_ParametersButtonWin_Title](../../../../images/img21814.png) icon) in the [dashboard title](../../dashboard-layout/dashboard-title.md). -Select the required parameter values in the Dashboard Parameters dialog and click the **Submit** button to apply the changes. To restore the default values, click the **Reset** button. \ No newline at end of file +To invoke the **Dashboard Parameters** dialog in the Web Dashboard, click the **Parameters** button in the dashboard title. Change the parameter values in the **Dashboard Parameters** dialog and click the **Submit** button to apply the changes. + +The following image shows how to invoke the **Dashboard Parameters** dialog and change the parameter value: + +![|Parameters Dialog](../../../../images/dashboard-parameters-web.gif) + +To reset changes to the default values, click the **Reset** button. diff --git a/dashboard-for-web/images/cascading-parameters-web.gif b/dashboard-for-web/images/cascading-parameters-web.gif new file mode 100644 index 0000000000..d83c78b409 Binary files /dev/null and b/dashboard-for-web/images/cascading-parameters-web.gif differ diff --git a/dashboard-for-web/images/conditional-formatting-create-expression-rule.png b/dashboard-for-web/images/conditional-formatting-create-expression-rule.png new file mode 100644 index 0000000000..c38ad3fd7d Binary files /dev/null and b/dashboard-for-web/images/conditional-formatting-create-expression-rule.png differ diff --git a/dashboard-for-web/images/dashboard-parameter-description.png b/dashboard-for-web/images/dashboard-parameter-description.png new file mode 100644 index 0000000000..ae35884ecf Binary files /dev/null and b/dashboard-for-web/images/dashboard-parameter-description.png differ diff --git a/dashboard-for-web/images/dashboard-parameters-web.gif b/dashboard-for-web/images/dashboard-parameters-web.gif new file mode 100644 index 0000000000..7f9ce34ebf Binary files /dev/null and b/dashboard-for-web/images/dashboard-parameters-web.gif differ diff --git a/dashboard-for-web/images/expression-type-conditional-formatting.png b/dashboard-for-web/images/expression-type-conditional-formatting.png new file mode 100644 index 0000000000..2b5068d9ef Binary files /dev/null and b/dashboard-for-web/images/expression-type-conditional-formatting.png differ diff --git a/dashboard-for-web/images/filter-data-source-with-parameter.png b/dashboard-for-web/images/filter-data-source-with-parameter.png new file mode 100644 index 0000000000..ea50ec6b52 Binary files /dev/null and b/dashboard-for-web/images/filter-data-source-with-parameter.png differ diff --git a/dashboard-for-web/images/filter-editor-dashboard-parameter-selection.png b/dashboard-for-web/images/filter-editor-dashboard-parameter-selection.png new file mode 100644 index 0000000000..464daedafb Binary files /dev/null and b/dashboard-for-web/images/filter-editor-dashboard-parameter-selection.png differ diff --git a/dashboard-for-web/images/filter-editor-dashboard-parameter.png b/dashboard-for-web/images/filter-editor-dashboard-parameter.png new file mode 100644 index 0000000000..6cece1c90d Binary files /dev/null and b/dashboard-for-web/images/filter-editor-dashboard-parameter.png differ diff --git a/dashboard-for-web/images/filter-sql-query.png b/dashboard-for-web/images/filter-sql-query.png new file mode 100644 index 0000000000..b767129b47 Binary files /dev/null and b/dashboard-for-web/images/filter-sql-query.png differ diff --git a/dashboard-for-web/images/wdd-parameters-calculated-field126509.png b/dashboard-for-web/images/wdd-parameters-calculated-field126509.png new file mode 100644 index 0000000000..0f9d7b1f0c Binary files /dev/null and b/dashboard-for-web/images/wdd-parameters-calculated-field126509.png differ diff --git a/dashboard-for-web/images/wdd-parameters-window-calculations126562.png b/dashboard-for-web/images/wdd-parameters-window-calculations126562.png new file mode 100644 index 0000000000..94cf9ebdb9 Binary files /dev/null and b/dashboard-for-web/images/wdd-parameters-window-calculations126562.png differ diff --git a/dashboard-for-web/images/wdd-query-parameters-complex-expression.png b/dashboard-for-web/images/wdd-query-parameters-complex-expression.png new file mode 100644 index 0000000000..4774d90d96 Binary files /dev/null and b/dashboard-for-web/images/wdd-query-parameters-complex-expression.png differ diff --git a/dashboard-for-web/images/wdd-query-parameters-parameter-expression.png b/dashboard-for-web/images/wdd-query-parameters-parameter-expression.png new file mode 100644 index 0000000000..08310be63d Binary files /dev/null and b/dashboard-for-web/images/wdd-query-parameters-parameter-expression.png differ diff --git a/dashboard-for-web/images/web-category-parameter-cascading.png b/dashboard-for-web/images/web-category-parameter-cascading.png new file mode 100644 index 0000000000..a72b831062 Binary files /dev/null and b/dashboard-for-web/images/web-category-parameter-cascading.png differ diff --git a/dashboard-for-web/images/web-category-parameter-filter-cascading.png b/dashboard-for-web/images/web-category-parameter-filter-cascading.png new file mode 100644 index 0000000000..abb2553666 Binary files /dev/null and b/dashboard-for-web/images/web-category-parameter-filter-cascading.png differ diff --git a/dashboard-for-web/images/web-category-query-parameter-setting.png b/dashboard-for-web/images/web-category-query-parameter-setting.png new file mode 100644 index 0000000000..21920d464c Binary files /dev/null and b/dashboard-for-web/images/web-category-query-parameter-setting.png differ diff --git a/dashboard-for-web/images/web-filter-properties.png b/dashboard-for-web/images/web-filter-properties.png new file mode 100644 index 0000000000..e58bc4ce2e Binary files /dev/null and b/dashboard-for-web/images/web-filter-properties.png differ diff --git a/dashboard-for-web/images/web-products-parameter-cascading.png b/dashboard-for-web/images/web-products-parameter-cascading.png new file mode 100644 index 0000000000..b4253600b5 Binary files /dev/null and b/dashboard-for-web/images/web-products-parameter-cascading.png differ diff --git a/dashboard-for-web/images/web-products-parameter-filter-cascading.png b/dashboard-for-web/images/web-products-parameter-filter-cascading.png new file mode 100644 index 0000000000..ee686df6cc Binary files /dev/null and b/dashboard-for-web/images/web-products-parameter-filter-cascading.png differ diff --git a/dashboard-for-web/images/web-products-query-parameter-setting.png b/dashboard-for-web/images/web-products-query-parameter-setting.png new file mode 100644 index 0000000000..1c870dc7cb Binary files /dev/null and b/dashboard-for-web/images/web-products-query-parameter-setting.png differ diff --git a/dashboard-for-web/toc.yml b/dashboard-for-web/toc.yml index bea263a267..39a6d11858 100644 --- a/dashboard-for-web/toc.yml +++ b/dashboard-for-web/toc.yml @@ -311,11 +311,13 @@ items: - name: Dashboard Parameters href: articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters.md items: - - name: Creating Parameters - href: articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/creating-parameters.md - - name: Passing Parameter Values + - name: Create Dashboard Parameters + href: articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/creating-parameters.md + - name: Create Cascading Parameters + href: articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/create-cascading-parameters.md + - name: Reference Dashboard Parameters href: articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/passing-parameter-values.md - - name: Requesting Parameter Values + - name: Specify Parameter Values href: articles/web-dashboard-designer-mode/data-analysis/dashboard-parameters/requesting-parameter-values.md - name: Expression Constants, Operators, and Functions href: articles/web-dashboard-designer-mode/data-analysis/expression-constants-operators-and-functions.md