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.
atoti.math.max(*measures)
Return a measure equal to the maximum of the passed arguments.
Example
>>> df = pd.DataFrame(
... columns=["City", "A", "B", "C", "D"],
... data=[
... ("Berlin", 15.0, 10.0, 10.1, 1.0),
... ("London", 24.0, 16.0, 20.5, 3.14),
... ("New York", -27.0, 15.0, 30.7, 10.0),
... ("Paris", 0.0, 0.0, 0.0, 0.0),
... ],
... )
>>> table = session.read_pandas(df, keys={"City"}, table_name="Math")
>>> cube = session.create_cube(table)
>>> l, m = cube.levels, cube.measures
>>> m["max"] = tt.math.max(m["A.SUM"], m["B.SUM"])
>>> cube.query(m["A.SUM"], m["B.SUM"], m["max"], levels=[l["City"]])
A.SUM B.SUM max
City
Berlin 15.00 10.00 15.00
London 24.00 16.00 24.00
New York -27.00 15.00 15.00
Paris .00 .00 .00
- Parameters:
measures (MeasureConvertible)
- Return type:
MeasureDefinition