Use Dashboard Parameter Values in Calculated Fields
- 2 minutes to read
You can combine dashboard data with parameters in an expression to calculate values, such as average discounted prices, totals, or geographical coordinates.
Note
Before you begin, create and configure the discountParameter dashboard parameter.
Follow these steps to create a calculated field that applies a parameter-based discount to the freight cost:
Open the Dashboard Designer menu and click Data Sources:

Click Add Calculated Field on top of the selected data source:

Combine dashboard parameters with data source fields using operators and functions. For example, the following expression calculates a discounted freight cost:
[Freight] * ( 1 - ( ?discountParameter / 100 ) )Tip
Enter a question mark (
?) followed by the parameter name to reference a parameter:?ParameterName.
Click the OK button to save the expression.
Related Tutorial
The following tutorial creates a parameter, assigns its value, and passes the value to a data source:
- Follow this tutorial to create an application that obtains data from a stored database procedure and passes a dashboard parameter as a procedure parameter.
Related GitHub-Hosted Sample Projects
This section lists all public GitHub repositories (DevExpress-Examples) that demonstrate primary usage scenarios for dashboard parameters:
- This example filters dashboard data by country name.
- This example displays sales data for a selected country. The example passes the country to the underlying SQL query as a hidden dashboard parameter.
Related Compiled Demo
To see the dashboard export functionality in action, run the BI Dashboards Designer/Viewer demo in the VCL Demo Center installed with compiled DevExpress VCL demos. Select any demo in the sidebar on the left, click the Export button, and use any export option listed in the menu.
Compiled DevExpress demos ship with source code installed in the Public Documents folder (%PUBLIC%) for all users (default). You can find all project and source code files for the BI Dashboards Designer/Viewer demo in the following folder:
%PUBLIC%\Documents\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressDashboards\
Tip
Project and source code files for all compiled DevExpress VCL Demos are maintained in a public repository hosted on GitHub: