Define an Aggregate Expression
An Aggregate Expression is an Expression that calculates an Expression against child data in a Relationship (example: Counting the number of Incidents linked to a Problem).
To define an Aggregate Expression:
- Create an Expression.
- In the Editor drop-down, select
Aggregate.
The Aggregate Expression section opens.
- Define the Expression:
- In the Relationship drop-down, select a
Relationship
(example: Problem Has Linked Incidents).
Note: Available Relationships are based on the associated Business Object (example: Problem).
- In the Function drop-down, select the
type of data you want to retrieve:
- Count: Number of Relationship occurrences (example: Number of linked Incidents).
- Total: Sum of a specified Numerical Expression.
- Average: Average of a specified Numerical Expression.
- Maximum: Highest returned value of a specified Numerical Expression.
- Minimum: Lowest returned value of a specified Numerical Expression.
- In the Apply Against drop-down
Token Selector,
select the
Field or
Numerical Expression for which you want
to apply the Expression. This option is available for Total, Average, Maximum,
Minimum functions.
Tip: Create a Custom Expression on-the-fly by clicking New Custom Expression in the Token Selector.
- (Optional) Limit the returned data using an additional
Expression:
- Select the
Limit check box.
The Limit fields become active.
- Select an Expression:
- Stored Expression: Click the
Ellipses button
to open the Expression Manager, and then select an existing stored Expression or create a new stored Expression. Stored Expressions can be reused in numerous places in CSM.
- Custom Expression: Click the
Custom Expression button
to open the Custom Expression Builder, and then create a custom Expression specifically for this scenario.
Note: Unlike Stored Expressions, Custom Expressions are created on-the-fly, only used where they are created, and not saved in the Expressions Manager.
- Stored Expression: Click the
Ellipses button
- Select the
Limit check box.
- In the Relationship drop-down, select a
Relationship
(example: Problem Has Linked Incidents).
-
Click OK.