Cube.MeasureProperties

Table

Returns a table containing the set of available properties for measures that are expanded in the cube.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Cube.MeasureProperties(cube as table) as table

Parameters

NameTypeRequiredDescription
cubetableYesThe cube table to retrieve measure properties from.

Return Value

tableA table listing the available properties for measures expanded in the cube.

Remarks

Cube.MeasureProperties returns a table containing the set of available properties for measures that are expanded in the cube. Measure properties are metadata attributes associated with measures in an Analysis Services model, such as format strings, display folders, measure group names, and aggregation functions.

Common measure properties include:

  • FORMAT_STRING -- the format pattern used to display the measure value (e.g., "$#,##0.00" for currency).
  • MEASURE_DISPLAY_FOLDER -- the display folder path for the measure.
  • MEASURE_AGGREGATOR -- the aggregation function (Sum, Count, Min, Max, etc.).
  • MEASURE_IS_VISIBLE -- whether the measure is visible to end users.

The returned table can be used with Cube.MeasureProperty to retrieve specific property values from individual measures.

Examples

Example 1: List measure properties available in a cube

let
    Source = AnalysisServices.Database("localhost", "AdventureWorks"),
    Cube = Source{[Name = "Adventure Works"]}[Data],
    MeasureProps = Cube.MeasureProperties(Cube)
in
    MeasureProps

Example 2: Use measure properties with a measure column

let
    Source = AnalysisServices.Database("localhost", "AdventureWorks"),
    Cube = Source{[Name = "Adventure Works"]}[Data],
    WithSales = Cube.AddMeasureColumn(
        Cube,
        "Sales",
        {"[Measures].[Internet Sales Amount]"}
    ),
    Props = Cube.MeasureProperties(WithSales)
in
    Props

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks