Average
- 2 minutes to read
The Average format conditions allow you to highlight values above or below an average value.
The following condition types are supported for measures.
Format Condition | Description | Can be applied to |
---|---|---|
The Above Average/Above or Equal Average format conditions allow you to apply formatting to elements whose values are above/above or equal to the average. For instance, the following image displays a Grid dashboard item whose Extended Price values that are above average (~ 141 000) filled in green. | Measures | |
The Below Average/Below or Equal Average format conditions allow you to apply formatting to elements whose values are below/below or equal to the average. For instance, the following image displays a Grid dashboard item whose Extended Price values that are below average (~ 141 000) filled in red. | Measures |
To create the Average format condition in code, create the FormatConditionAverage class instance and specify the following settings.
- Specify the comparison logic by setting the FormatConditionAverage.AverageType property.
- Specify the required style settings applied to target elements using the FormatConditionStyleBase.StyleSettings property. You can change the color of dashboard item elements, font settings (AppearanceSettings) or add predefined icons (IconSettings).
Assign the resulting FormatConditionAverage object to the DashboardItemFormatRule.Condition property.
How to: Apply Conditional Formatting to Grid Cells using the Top-Bottom and Average Conditions