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

Conditional Formatting

  • 6 minutes to read

The Web Dashboard control supports conditional formatting. You can apply a custom style to data elements that satisfy a certain condition. Supported elements include cells in Grid and Pivot, and cards in a Card item.

wdd-cf-main

Format Rules

You can use measure or dimension values to calculate a format rule. For a Card dashboard item, format rules also can be calculated by delta values.

Format conditions that can be applied to different data item types are as follows:

Data Type

Supported Format Rules

numeric

Value

Top-Bottom

Average

Expression

Icon Ranges

Color Ranges

Gradient Ranges

Bar[1]

Bar Color Ranges[1]

Bar Gradient Ranges[1]

string

Value with the condition type set to Equal To, Not Equal To or Text that Contains

Expression

date-time

Value

A Date Occurring for dimensions with the continuous date-time group interval

Expression

Icon Ranges

Color Ranges

Gradient Ranges

Bar[1]

Bar Color Ranges[1]

Bar Gradient Ranges[1]

Create a Format Rule

To create a format rule, open the Conditional Formatting section in the dashboard item’s Options menu or in the data item menu. Click “+” to add a new format rule:

wed-dashboard-cf-add-rule

Specify the data item/card used to calculate a condition in the Common section. You can also create a format rule for one data item and apply different settings to the other data item.

Select a format rule type from the list to open its settings.

wdd-grid-cf-select-rule-type

Select a condition from the list and specify its settings in the Condition section. Available settings depend on the selected format rule.

wdd-grid-cf-value-menu

Specify additional settings in the Miscellaneous section. For example, you can specify an intersection level for a Pivot or apply a rule to a row in a Grid.

See the following sections for more information about specific format settings for dashboard items:

Edit a Format Rule

To edit a format rule, select the rule and click Edit (wdd-icon-edit-collection-value-item).

wdd-grid-cf-edit-rule

Click Delete (wdd-icon-delete-big) to delete the selected format rule.

When you edit a format rule, you can enable or disable the rule in the Miscellaneous section.

Other settings in the Miscellaneous section depend on the selected dashboard item.

Appearance Settings

The format rule’s menu Condition section contains appearance settings. You can configure and customize current format condition appearance settings:

  • Choose a predefined background color or font in the Appearance tab.

    wdd-cf-appearance-gallery

  • Add a predefined icon in the Icons tab.

    wdd-cf-icons-gallery

You can also customize predefined colors and values for each Range format rule.

wdd-cf-range-gallery

Grid Settings

A Grid dashboard item allows you to apply conditional formatting to data items which provide data to the dimension and measure column types.

wdd-grid-conditional-formatting

You can use hidden measures to specify a condition used to apply formatting to visible values. New appearance settings are applied to grid cells that correspond to the target dimension/measure values.

The format rule’s Miscellaneous section contains the following properties that are specific to the Grid item:

Option Description
Enabled Enables/ Disables the current format rule.
Applied to Row Applies the current format rule to a row.

Pivot Settings

A Pivot dashboard item applies conditional formatting to cell values. You can calculate a format rule by measures placed in the Values section and dimensions placed in the Columns or Rows sections.

wdd-pivot-cf

You can use hidden measures to specify a condition used to apply formatting to visible values. New appearance settings are applied to data cells that correspond to a row/column intersection. You can set a new intersection of the row and column or use predefined settings.

Note the following specifics:

  1. The dashboard does not calculate format rules in a pivot for percentage values on multiple levels. In this case, “All Levels” intersection mode is not available.
  2. If you create a new format rule for a dimension from the Columns/Rows section, the corresponding format condition dialog does not contain any Pivot-specific settings.

The format rule’s Miscellaneous section contains Pivot-specific options:

Option Description
Enabled Enables/ Disables the current format rule.
Intersection Mode Specifies the level on which to apply conditional formatting to pivot cells.
Intersection Row/Column Dimension Applies the format rule to the specified row/column dimension, if you select the Specific Level as the intersection mode.
Apply to Row/Column Specifies whether to apply the formatting to the entire Pivot’s row/column.

A Pivot item allows you to specify to which field intersection a format rule is applied.

Intersection Level Mode Description
Auto Identifies the default level. For the Pivot dashboard item, Auto identifies the First Level.
First Level The first level values are used to apply conditional formatting.
Last Level The last level values are used to apply conditional formatting.
All Levels All pivot data cells are used to apply conditional formatting.
Specific Level The specified measures/dimensions are used to apply conditional formatting.

For example, the Pivot item has three fields in the column area (Year, Category, and Product) and one field in the row area (State):

intersection_levels

The image below displays different intersection levels with the applied format rule:

pivot_applied_levels

To apply a format rule to the row or column Grand Total, change the Intersection Level Mode to Specific level and set the [Grand Total] value as the intersection row/column dimension.

Card Settings

For a Card dashboard item, you can apply conditional formatting to the card’s visual elements (like Title, Subtitle, different values) and change the card’s background.

Available settings in the Common section depend on the selected Calculated by option:

  • If you select the Card option, specify the card by whose values the format rule is calculated. The format rule applies to the related card. The Value Type option enables you to specify the card’s value type according to which a condition is calculated. The expression format condition is an exception to this rule and applies to all cards.
  • For the Data Item option you can choose a hidden measure or series dimension. The rule applies to all cards in a Card item.

To apply the selected appearance to the Title, Subtitle, values and other card’s layout elements, use the Apply to drop-down list. The All elements value applies the format rule to all card elements.

If you select background color, it applies to the entire card and the Apply to value is not in effect.

Some predefined background styles contain a font color. This font color applies to all the card’s elements regardless of the drop-down list settings (all/particular element).

Note

Cards that use a legacy layout do not support conditional formatting.

Footnotes
  1. A Card dashboard item does not support these rules.