Skip to main content

final class atoti.SiblingsScope

Scope performing a “siblings” aggregation. The aggregated value for each member of a given level in hierarchy is computed by aggregating all the members with the same parents (i.e. its siblings) with the given function. A siblings aggregation is appropriate for operations such as marginal aggregations (e.g. marginal VaR, marginal mean) for non-linear aggregation functions.

Example

Using this scope with atoti.agg.sum() to perform a “siblings” sum:
Using exclude_self:

exclude_self : bool = False

If True, the current member will not contribute to its aggregated value.

hierarchy : HasIdentifier[HierarchyIdentifier] | HierarchyIdentifier

The hierarchy along which the aggregation will be performed.