Cube.MeasureProperty
TableReturns the value of a named property from a measure.
Syntax
Cube.MeasureProperty(measure as any, propertyName as text) as anyParameters
| Name | Type | Required | Description |
|---|---|---|---|
measure | any | Yes | A measure value from which to retrieve the property. |
propertyName | text | Yes | The name of the measure property to retrieve. |
Return Value
any — The value of the specified property for the given measure.
Remarks
Cube.MeasureProperty returns the value of the property propertyName from the specified measure. This function is the measure counterpart of Cube.AttributeMemberProperty, which retrieves properties from dimension attribute members.
Common measure properties you can retrieve include:
FORMAT_STRING-- the format pattern for displaying measure values.MEASURE_AGGREGATOR-- the aggregation type (e.g., Sum, Count, Distinct Count).MEASURE_DISPLAY_FOLDER-- the display folder where the measure is organized.DESCRIPTION-- the description text defined for the measure.
The list of available property names can be discovered using Cube.MeasureProperties.
Examples
Example 1: Get the format string of a measure
let
Source = AnalysisServices.Database("localhost", "AdventureWorks"),
Cube = Source{[Name = "Adventure Works"]}[Data],
Measures = Cube.Measures(Cube),
SalesMeasure = Measures{[Name = "Internet Sales Amount"]}[Value],
FormatString = Cube.MeasureProperty(SalesMeasure, "FORMAT_STRING")
in
FormatStringExample 2: Get the aggregation type of a measure
let
Source = AnalysisServices.Database("localhost", "AdventureWorks"),
Cube = Source{[Name = "Adventure Works"]}[Data],
Measures = Cube.Measures(Cube),
CountMeasure = Measures{[Name = "Internet Order Count"]}[Value],
Aggregator = Cube.MeasureProperty(CountMeasure, "MEASURE_AGGREGATOR")
in
AggregatorCompatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks