Cube.AttributeMemberProperty
TableReturns the value of a named property from a dimension attribute member.
Syntax
Cube.AttributeMemberProperty(attribute as any, propertyName as text) as anyParameters
| Name | Type | Required | Description |
|---|---|---|---|
attribute | any | Yes | A dimension attribute member value from which to retrieve the property. |
propertyName | text | Yes | The name of the member property to retrieve. |
Return Value
any — The value of the specified property for the given dimension attribute member.
Remarks
Cube.AttributeMemberProperty retrieves a named property from a dimension attribute member. In Analysis Services, dimension members can have additional properties beyond their name and key -- for example, a Customer member might have properties like Phone, Email, or Address.
Member properties can be either intrinsic (built-in properties like MEMBER_CAPTION, MEMBER_UNIQUE_NAME, LEVEL_NUMBER) or custom properties defined in the cube's dimension design.
This function is useful for accessing metadata or supplementary attributes of dimension members without needing to expand additional dimension attributes.
Examples
Example 1: Get a member property from a dimension attribute
let
Source = AnalysisServices.Database("localhost", "AdventureWorks"),
Cube = Source{[Name = "Adventure Works"]}[Data],
WithProduct = Cube.AddAndExpandDimensionColumn(
Cube,
{"[Product]"},
{"[Product].[Product Name]"}
),
FirstRow = Table.First(WithProduct),
Caption = Cube.AttributeMemberProperty(
FirstRow[Product Name],
"MEMBER_CAPTION"
)
in
CaptionExample 2: Add a member property as a column
let
Source = AnalysisServices.Database("localhost", "AdventureWorks"),
Cube = Source{[Name = "Adventure Works"]}[Data],
WithProduct = Cube.AddAndExpandDimensionColumn(
Cube,
{"[Product]"},
{"[Product].[Product Name]"}
),
AddColor = Table.AddColumn(
WithProduct,
"Color",
each Cube.AttributeMemberProperty([Product Name], "Color"),
type text
)
in
AddColor