The MemberKeyColumn property of the Level interface contains the name or expression of the column that contains member keys. For a virtual level, the MemberKeyColumn property contains the name of the dimension, level, and member property of an existing dimension in the database.
clsAggregationLevel | clsDatabaseLevel |
clsCubeLevel | clsPartitionLevel |
String
The access type depends on the level object class.
Class | Access |
---|---|
clsDatabaseLevel | R/W |
clsCubeLevel | R/W |
clsCubeLevel (for virtual cubes) | R |
clsPartitionLevel | R/W |
clsAggregationLevel | R/W |
MemberKeyColumn can be any valid SQL expression involving one or more columns from a single table. For example, either of the following is a valid MemberKeyColumn expression that uses the “Product”.”Prod_Year” column:
"Product"."Prod_Year"
DatePart('q',"Product"."Prod_Year")
In relational terms, a key is a set of one or more columns that uniquely identifies an entity. MemberKeyColumn is a key in this sense if the IsUnique property of a level is True. If IsUnique is False, MemberKeyColumn uniquely identifies a member within the context of a parent member only. For example, months are unique only within the context of a given year.
For virtual levels (that is, those of SubClassType sbclsVirtual) the MemberKeyColumn is mapped to the member property of a level within an existing dimension, for example, [Product].[Brand Name].[Company]. When creating levels, it is recommended that the lowest level have unique members as this will improve processing of the cube. MemberKeyColumn controls the way in which the dimensions within a cube are processed. For lookups, the Decision Support Objects (DSO) object model expects the fact table to contain member key values but not necessarily member names. The user, however, sees the member names rather than the keys.
Use the following code to set a level object MemberKeyColumn to the Customer_Number column in table Customer:
LevelObject.MemberKeyColumn = """Customer"".""Customer_Number"""
About Decision Support Objects | Using Decision Support Objects |
Properties Cross-Reference |