atoti.named_measure module

class atoti.named_measure.NamedMeasure(_name, _data_type, _cube, _java_api, _folder=None, _formatter=None, _visible=True, _description=None)

A named measure is a measure that has been published to the cube.

property data_type

Type of the measure members.

Return type

DataType

property description

Description of the measure.

Return type

Optional[str]

property folder

Folder of the measure.

It can be changed by assigning a new value to the property (None to clear it).

Return type

Optional[str]

property formatter

Formatter of the measure.

It can be changed by assigning a new value to the property (None to clear it).

Examples

  • DOUBLE[0.00%] for percentages

  • DOUBLE[#,###] to remove decimals

  • DOUBLE[$#,##0.00] for dollars

  • DATE[yyyy-MM-dd HH:mm:ss] for datetimes

The spec for the pattern between the DATE or DOUBLE’s brackets is the one from Microsoft Analysis Services. The formatter only impacts how the measure is displayed, derived measures will still be computed from unformatted value. To round a measure, use atoti.math.round() instead.

atoti provides an extra formatter for array measures:
  • ARRAY['|';1:3] this formatter allows you to choose the separator to use (| in this example), and the slice of the array to display.

Return type

Optional[str]

property name

Name of the measure.

Return type

str

property visible

Whether the measure is visible or not.

It can be toggled by assigning a new boolean value to the property.

Return type

bool