Skip to main content
A newer version of this page is available. .

Expression

  • 2 minutes to read

An Expression format condition allows you to use complex conditions to apply formatting.

Create a Format Rule

To format values according to the Expression condition, click the menu button of the required data item and select Add Format Rule | Expression.

AddFormatRule_ValueItem

This invokes the Expression dialog that allows you to specify the required expression. For instance, the following image displays a Grid dashboard item whose rows are filled in green if the Extended Price/Quantity values are greater than 150 000 and 7 500, respectively.

FormatConditionExpressionDialog

You can pass static values when creating conditions or pass a dashboard parameter to apply conditional formatting dynamically. To learn more, see Passing Parameter Values.

Create a Format Rule in Code

To create the Expression format condition in code, create a FormatConditionExpression class instance and specify the following settings.

Assign the resulting FormatConditionExpression object to the DashboardItemFormatRule.Condition property.

How to: Use Dashboard Parameters with the Expression Format Condition