Skip to main content
atoti.SiblingsScope(
    hierarchy: HasIdentifier[HierarchyIdentifier] | HierarchyIdentifier,
    *,
    exclude_self: bool = False,
)
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. Using this scope with atoti.agg.sum() to perform a “siblings” sum:
Using exclude_self:

Attributes

hierarchy

The hierarchy along which the aggregation will be performed.

exclude_self

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