Cube.Properties

Table

Returns a table containing the set of available properties for dimensions 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.Properties(cube as table) as table

Parameters

NameTypeRequiredDescription
cubetableYesThe cube table to retrieve dimension properties from.

Return Value

tableA table listing the available dimension properties for dimensions expanded in the cube.

Remarks

Cube.Properties returns a table containing the set of available properties for dimensions that are expanded in the cube. These are the dimension member properties that can be accessed via Cube.AttributeMemberProperty.

Dimension properties provide supplementary information about dimension members. For example, a Geography dimension might expose properties like Latitude, Longitude, or Population for its members. A Product dimension might expose Color, Weight, or List Price.

The properties returned depend on which dimensions have been expanded in the cube using Cube.AddAndExpandDimensionColumn. Only properties for currently expanded dimensions are listed. Use Cube.PropertyKey to get the key identifier for a specific property.

Examples

Example 1: List available dimension properties

let
    Source = AnalysisServices.Database("localhost", "AdventureWorks"),
    Cube = Source{[Name = "Adventure Works"]}[Data],
    WithProduct = Cube.AddAndExpandDimensionColumn(
        Cube,
        {"[Product]"},
        {"[Product].[Product Name]"}
    ),
    Props = Cube.Properties(WithProduct)
in
    Props

Example 2: Use properties to access member metadata

let
    Source = AnalysisServices.Database("localhost", "AdventureWorks"),
    Cube = Source{[Name = "Adventure Works"]}[Data],
    WithGeo = Cube.AddAndExpandDimensionColumn(
        Cube,
        {"[Geography]"},
        {"[Geography].[City]"}
    ),
    Props = Cube.Properties(WithGeo),
    PropertyNames = Table.SelectColumns(Props, {"Name"})
in
    PropertyNames

Compatibility

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