Skip to main content
atoti.parent_value(
    measure: VariableMeasureConvertible | str,
    /,
    *,
    degrees: Mapping[Hierarchy, int],
    apply_filters: bool = False,
    total_value: MeasureConvertible | None = None,
    dense: bool = False,
) → MeasureDefinition
Return a measure which values are equal to the values of the given measure, at a member that is located at a higher level on each of the specified hierarchy. This operation is also called drilling up a hierarchy.

Parameters

measure

The measure from which the values are copied.

degrees

The number of levels to go up to select the parent member along any given hierarchy.

apply_filters

Whether or not the query filters on hierarchies specified in the degrees mapping must be applied when computing the value at the parent member.

total_value

The value to return when the drill up went above the top level of all the hierarchies in the degrees mapping.

dense

When True, the parent value will be replicated on all members of the levels of the hierarchies in the degrees mapping, even those with no value for the given measure.
See also: atoti.total() to take the value at the top level member on each given hierarchy.