Skip to main content

atoti.parent_value(measure, /, *, degrees, apply_filters=False, total_value=None, dense=False)

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 (VariableMeasureConvertible | str) – The measure from which the values are copied.
    • degrees (Mapping [Hierarchy , int ]) – The number of levels to go up to select the parent member along any given hierarchy.
    • apply_filters (bool) – 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 (MeasureConvertible | None) – The value to return when the drill up went above the top level of all the hierarchies in the degrees mapping.
    • dense (bool) – 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.
  • Return type: MeasureDefinition

Example

See also: atoti.total() to take the value at the top level member on each given hierarchy.