Databases Reference
In-Depth Information
of the member) or the key path (using the key of the member). Using the de-
fault properties in BIDS to creating your cubes and dimensions you can ac-
cess a member in a dimension with its dimension name, hierarchy name and
level name. For example, member Q1 CY 2004 in the Calendar hierarchy is
represented as
[Date].[Calendar].[Calendar Quarter].[Q1 CY 2004]
The brackets [ and ] are used to enclose the names of the dimension, hier-
archy, levels, and members. It is not necessary that these names be enclosed
within the square brackets every time, but whenever you have a name that is
separated by a space, or has a number in it, or if the name is an MDX
keyword, brackets must be used. In the preceding expression the dimension
name Date is an MDX keyword and hence must be enclosed within brackets.
The following three representations are also valid for the member Q1 CY
2004.
[Date].[Calendar].[Q1 CY
2004] (1)
[Date].[Calendar].[CY 2004].[H1 CY 2004].[Q1 CY
2004] (2)
[Date].[Calendar].[Calendar
Quarter].&[2004]&[1] (3)
In the first representation the member is represented in the format Dimen-
sion.Hierarchy.Member name. You can use this format so long as there are
no two members of the same name. For example, if quarter 1 in each year is
called Q1 then you cannot use the above format; you would need to qualify
using the level name in the MDX expression. If you do use the above format it
will always retrieve Q1 for the first year in the hierarchy. In the second format
you can see the navigational path for the member clearly since you see all
the members in the path. So far the formats for accessing members you have
seen are all using the name of the members. The final representation uses
the key path where you can see the key of members in a path is represented
by &[membername]. When you use the key path the members are always
preceded with the & symbol.
Another example is the member Australia of hierarchy Country in the Cus-
tomer dimension, which would be specified as
[Customer].[Country].Australia
Search WWH ::




Custom Search