Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt

Use this file to discover all available pages before exploring further.

final class atoti.Measure

A measure is a mostly-numeric data value, computed on demand for aggregation purposes.

Example

Copying a measure does not copy its attributes:
>>> table = session.create_table("Example", data_types={"ID": "String"})
>>> cube = session.create_cube(table)
>>> m = cube.measures
>>> m["Original"] = 1
>>> m["Original"].description = "Test description"
>>> m["Original"].folder = "Test folder"
>>> m["Original"].formatter = "INT[test: #,###]"
>>> m["Original"].visible = False
>>> m["Copy"] = m["Original"]
>>> m["Copy"].description
''
>>> print(m["Copy"].folder)
None
>>> m["Copy"].formatter
'INT[#,###]'
>>> m["Copy"].visible
True
Redefining a measure resets its attributes:
>>> m["Original"] = 2
>>> m["Original"].description
''
>>> print(m["Original"].folder)
None
>>> m["Original"].formatter
'INT[#,###]'
>>> m["Original"].visible
True
See also: Measures to define one.
data_typeType of the values the measure evaluates to.
descriptionDescription of the measure.
folderFolder of the measure.
formatterFormatter of the measure.
isinReturn a condition evaluating to True where this measure evaluates to one of the given values, and evaluating to False elsewhere.
isnullReturn a condition evaluating to True where this measure evalutes to None, and evaluating to False elsewhere.
nameName of the measure.
visibleWhether the measure is visible or not.