Show TOC

DefaultAggregation AnnotationsLocate this document in the navigation structure

Specifies aggregation behavior on element level

Scope and Definition
@Scope:[#ELEMENT]
Annotation DefaultAggregation : String enum { NONE; SUM; MIN; MAX; AVG; COUNT; COUNT_DISTINCT; FORMULA; };
Usage
Annotation Meaning

DefaultAggregation

When the DefaultAggregation annotation has been specified for an element, the corresponding elements are used as so called measures (elements that can be aggregated) both in standard CDS QL scenarios and on analytical scenarios.

Scope: [ELEMENT]

Evaluation Runtime (Engine):

Values:

Value Description
SUM, MAX, MIN, AVG, COUNT, COUNT_DISTINCT All these values determine the default aggregation of the measure.
FORMULA The value FORMULA indicates, that the element is a formula which has to be calculated after the operands have been determined by aggregation or calculation. It should never be aggregated.

Example: Margin : = Revenue / Cost. If in a report Margin should be shown per OrgUnit, then first the aggregates of Revenue and Cost have to be determined per OrgUnit and then the Margin has to be calculated per OrgUnit.

NONE This value indicates that the element is not a measure. Usually these elements are used in filters and GROUP BY statements.
NOTE

If no DefaultAggregation annotation is assigned to an element, the engine assumes the aggregation behavior for NONE value (no aggregation takes place).