Skip to main content
Skip table of contents

Conditions

Conditions and Condition Groups

Sometimes it is useful to look at a measure by grouping its possible values into levels. For example, given a percentage score on a test, we might group scores from 70% to 85% under the rating "satisfactory." In the Portal, the tools we use to do this are called Conditions and Condition Groups.

  • A condition consists of an interval or string, a label, and a color (from a selected color palette).
  • A condition group is a collection of conditions that together cover all the data.

Condition groups are defined separately from the metric and then linked to the metric or column. Two metrics that are built using the same column may use different condition groups. However, one condition group can apply to a variety of metrics.

Metric conditions provide highlighting on values within a metric, including charts, dials, and tables. Conditions can be defined with a static list or through a dynamic query.

Dynamic conditions allow a developer to create a single condition group for which its corresponding conditions' item boundaries (low and high values) are determined when the metric is generated.

Condition Set Editor

If permissions allow, you can add and maintain metric conditions using the Condition Set Editor.

To open the editor:

  1. Choose Content Definitions in the Navigation tree, then Conditions.
  2. Open the appropriate Metric Conditions folder.
  3. To add a new condition, choose +New, then Metric Condition Set.
    1. Enter a Name and Description.
    2. Set the Type to Static or Dynamic.
      1. If you select Static, choose the Data Connection.
    3. Select a Color Palette.
    4. Click Update.
  4. To edit an existing condition, select the Metric Condition Set definition and click the Edit (pencil) button.
  5. Based on the color palette selected, the editor displays condition options by color. For each condition item, update the condition attributes:
    1. Enter a Name for the threshold item.
    2. Add a Description of the item; this is displayed on the Comments page of a metric that uses the condition group.
    3. In the Condition Type field, select the operator used to evaluate the condition.
    4. In the Data Comparison field, enter the values being evaluated, based on the assigned operator.
    5. Use the Font Preview section to select the font color used for values falling within the range. This setting is only applied in HTML Table, Crosstab, and any of the Dynamic style templates to set font color.
  6. To add a condition item, click the + button.
  7. To remove a condition item, click the trash button on the item's card.
  8. To disable an item, click the open circle button on the item's card.

Condition Set Properties

To view Condition Set properties, choose Content Definitions in the Navigation tree, then Conditions.

Metric Condition Set definitions are stored in a Metric Condition folder. Open the folder and select the condition set to open the View Properties window.

Setting

Description

Connection

Once defined under the Connections folder, objects will be available in the drop-down list to provide connection information to the database when a dynamic query is used.

Query

A text field used to define the SQL statement executed by a dynamic condition query. This is only used when the Connection field is set to a value other than [None]. To create conditions that have more than one value, complex SQL (unions) must be used to populate these values.

Type

Defines the current type of condition set.

Assigned Condition Map

An indexed list where each entry maps to the corresponding index in the color palette, with each entry containing a list of conditions that apply to this entry.

Color Palette

The color palette assigned to this condition set.

Dynamic Condition Items

Dynamic condition items use a custom query and data connection to query a custom table to provide conditions or a static query that returns the rows using a union for each row.

Query Field

Description

ThresholdName

Name of this condition item. (string: optional)

ThresholdDesc

Description of this condition item. (string: optional)

text_color

Hex code, rgb, or named color for the font color to be used when this condition item is matched. If not defined or null then an automatic font color is used, so that it is visible over the specified background color. (string: optional)

bg_color

Hex code, rgb, rgba, or named color for the background color to be used when this condition item is matched. (string: required)

low_value

Numeric, Decimal, or Integer value used to specify the low bound of this condition item when the match is performed. When not defined or null, then the previous high_value is offset by 0.000001 to generate the item's low value. Otherwise, 0 is used. (number: optional)

high_value

Numeric, Decimal, or Integer value used to specify the high bound of this condition item when the match is performed. This value is required and must be defined. (number: required)

is_locked

Bit, Integer, Numeric that evaluates to true when set to 1, false otherwise. When set to true, the assigned font color is ignored and will be automatically determined, so that it is visible over the specified background color. (boolean: optional)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.