Namespace: com.sap.vocabularies.Analytics.v1
Terms for annotating analytical resources
Term | Type | Description |
---|---|---|
Dimension (Deprecated) | Tag | Deprecated in favor of AnalyticalContext/Dimension |
Measure (Deprecated) | Tag | Deprecated in favor of AnalyticalContext/Measure |
AccumulativeMeasure (Deprecated) | Tag | Deprecated in favor of AnalyticalContext/AccumulativeMeasure |
RolledUpPropertyCount (Experimental) | Int16 | Number of properties in the entity instance that have been aggregated away |
DrillURL (Experimental) | URL | URL to retrieve more detailed data related to a node of a recursive hierarchy. Annotations with this term MUST include a qualifier to select the hierarchy for which the drill URL is provided. |
PlanningAction (Experimental) | Tag | Processes or generates plan data. Its logic may have side-effects on entity sets. |
AggregatedProperties (Deprecated) | [AggregatedPropertyType] | Deprecated in favor of AggregatedProperty |
AggregatedProperty | AggregatedPropertyType | Dynamic property for aggregate expression with specified aggregation method defined on the annotated entity type. |
AnalyticalContext | [AnalyticalContextType] | Collection of properties that define an analytical context |
LevelInformation (Experimental) | HierarchyType | Information about grouping levels in the result set of a request including the MultiLevelExpand transformation |
$apply
transformation that expands an unnamed leveled hierarchy with custom aggregation of certain properties
Example transformation sequence: filter on columns Industry
, Amount
and Currency
, order by Amount
descending, show 2 levels, with two exceptions preceded by one row with a leaves count and one row with the grand total
$apply=filter(Industry in ('IT','AI'))
/groupby((Country,Region,Segment,Industry),
filter($these/aggregate(Amount) gt 0 and
$these/aggregate(Currency) ne null))
/concat(
groupby((Country,Region,Segment,Industry))
/aggregate($count as LeavesCount),
aggregate(Amount,Currency),
Analytics.MultiLevelExpand(
LevelProperties=[{"DimensionProperties":["Country"],"AdditionalProperties":["CountryName"]},
{"DimensionProperties":["Region"],"AdditionalProperties":["RegionName"]},
{"DimensionProperties":["Segment","Industry"],"AdditionalProperties":[]}],
Aggregation=["Amount","Currency"],
SiblingOrder=[{"Property":"Amount","Descending":true}],
Levels=2,
ExpandLevels=[{"Entry":["US"],"Levels":0},
{"Entry":["DE","BW"],"Levels":1}]
)/concat(aggregate($count as ResultEntriesCount),
skip(20)/top(10)))
Parameter | Type | Description |
---|---|---|
InputSet | [EntityType] | Binding parameter: Entity set to be processed |
LevelProperties | [MultiLevelExpandLevel] | Collection of aggregation levels forming a leveled hierarchy Each element in the collection defines the properties that constitute one level. A property must not be referenced by more than one level. The first element in the collection defines the property names of the coarsest level, the following elements define the property names of consecutively finer-grained aggregation levels. The function result is the leveled hierarchy with these levels in preorder, entries on the finest-grained level cannot be expanded further. The result does not contain a level representing a root or grand total. All referenced properties must be groupable. |
Aggregation | [String] | Properties to aggregate for all result entries on all levels All properties in this collection must be custom aggregates. |
SiblingOrder | [MultiLevelExpandSiblingOrder] | Sort specification to apply to all direct descendants of a given entry (so-called siblings) in the resulting leveled hierarchy |
Levels | Int64 | Optional parameter: Number N of levels to be shown in the initial expansion The initial expansion shows the first N levels as defined in LevelProperties (1 ≤ N ≤ length of LevelProperties ). If this parameter is omitted, all levels are shown. |
ExpandLevels | [MultiLevelExpandEntry] | Optional parameter: Entries with exceptional expansion |
SubtotalsAtBottom | Boolean | Optional parameter: Whether to duplicate the group headers so that they appear before and after their descendants The entry before has DrillState expanded , the entry after has DrillState subtotal . |
→ | [EntityType] | Output set including the instance annotation LevelInformation |
Property | Type | Description |
---|---|---|
Name | SimpleIdentifier | Name of the dynamic property holding the aggregated value. |
AggregationMethod | AggregationMethod | Name of the standard or custom aggregation method to be applied. |
AggregatableProperty | PropertyPath | Property whose values shall be aggregated. |
Applicable Annotation Terms:
Exactly one of Property
and DynamicProperty
must be present
Property | Type | Description |
---|---|---|
Property | PropertyPath? | Property that is part of the analytical context |
DynamicProperty | AnnotationPath? | Dynamic property introduced by annotations that is part of the analytical context Allowed Terms: |
Dimension | Tag | The property holds the key of a dimension |
Measure | Tag | The property holds the numeric value of a measure |
AccumulativeMeasure | Tag | The measure has non-negative and additive values; it can be used in whole-part charts, e.g. the Donut |
Property names constituting a level in an unnamed leveled hierarchy
DimensionProperties
must be used to identify entries in ExpandEntries/Entry
, otherwise they have the same effect as AdditionalProperties
.
Property | Type | Description |
---|---|---|
DimensionProperties | [String] | A non-empty list of property names that define a combination of dimension values |
AdditionalProperties | [String] | A possibly empty list of names of additional properties of the dimensions that occur in DimensionProperties |
Sibling order in an unnamed leveled hierarchy
Property | Type | Description |
---|---|---|
Property | String | Property by which to sort |
Descending | Boolean? | Sort direction, ascending if not specified otherwise |
Expansion state of an entry in an unnamed leveled hierarchy
Property | Type | Description |
---|---|---|
Entry | [String] | An entry on a given level is identified by a list of values for the DimensionProperties that constitute all levels up to and including the given oneThe values are cast to strings as in the OData cast function. |
Levels | Int64? | Number of levels to be expanded, null means all levels, 0 means collapsed |