Conditional Formatting

  • 3 minutes to read

The Dashboard Designer control supports conditional formatting. You can apply a custom style to data elements that satisfy a certain condition for Grid, Pivot, Chart, Scatter Chart and Card items.

BlogDashboard_ConditionalFormatting

Format Rules

Refer to the Conditional Formatting Basics topic for information about the format rules that can be applied to different data item types.

Create and Edit a Format Rule

You can create and edit format rules in the following ways:

  • Click the Edit Rules button on the Home ribbon tab.

    EditRules_Ribbon

    This action invokes the Edit Rules dialog where you can create a new format rule or manage rules applied to the dashboard item.

  • Click the measure/dimension menu button in the Data Item’s pane and select Add Format Rule/Edit Rules.

    EditRulesMenuItem

    The Add Format Rule option invokes the pop-up menu where you can select the format rule and format condition’s type for a new rule.

    When you click Edit Rules, the Edit Rules dialog appears. You can edit all created format rules for the selected data item in the dialog.

    The Clear Rules button clears the rules for the specified data item.

The Edit Rules Dialog

The Edit Rules dialog contains format rules applied to the dashboard item:

EditRulesDialog

You can manage format rules in the dialog in the following ways:

Action Description
Edit the selected rule Use the Edit button or double-click the rule.
Delete the selected rule Use the Delete button.
Reorder format rules Use the Up (EditRules_UpButton) and Down (EditRules_DownButton) buttons. You can reorder rules to specify their priority. Rules are applied from top to bottom. The bottom rule has the highest priority.
Enable/disable a rule Use the corresponding check box in the left column.
Create a new rule Click the Add button and select the format condition. The calculated by combo box allows you to select the measure/dimension that is used to calculate the format rule. For Card, when you create a rule for delta, specify the delta type whose values are used to calculate a condition in the using combo box.
Filter format rules by the specified data item Use the Filter by combo box.

The Add button invokes a pop-up menu where you can specify appearance settings and set the condition’s value for the format rule. Available settings depend on the selected format rule.

The image below displays the Greater Than dialog that corresponds to the Value format condition for a Grid dashboard item. The format condition applies to the ExtendedPrice data item in the Apply to drop-down list.

GreaterThanDialog

Dashboard Items Specific

Refer to the following topics for more information about specific format rule settings and how to create a format rule in code for different dashboard items: