Sie sind auf Seite 1von 3

MDX Dimension Specification

Syntax
<dimension> :: =
<dimension-name-specification>
| <member>.DIMENSION
| <layer>.DIMENSION
| DIMENSION ( <member> | <layer> )
Syntax Description
<dimension-name-specification> A dimension name. See Description, item 1.
<member>.DIMENSION Dimension function with a member specification as input.
<layer>.DIMENSION Dimension function with a layer specification as input.
DIMENSION ( <member> | <layer> ) Alternate syntax. Dimension ( <member> ) has th
e same effect as <member>.Dimension.
Dimension ( <layer> ) has the same effect as <layer>.Dimension.
Description
A dimension can be represented in the following ways:
1. Using the dimension name (the name of the top member of a dimension.) For exa
mple,
[Market] .
2. Using the Dimension function with a member of a dimension as input. For examp
le,
[New York].Dimension or Dimension ( [New York] ) .
3. Using the Dimension function with a layer specification as input. For example
,
Dimension ([Market].Generations(2).Members) or
{([Market].Generations(2).Members)}.Dimension.
MDX Layer Specification

A layer is a shared depth in the outline hierarchy. Therefore, the concept of la


yer includes
generations and levels. Represent a layer using the following rules:
Syntax
<layer> ::=
<layer-name-specification>
| Levels ( <dim_hier>, <index> )
| <dim_hier>.Levels ( <index> )
| Generations ( <dim_hier>, <index> )
| <dim_hier>.Generations ( <index> )
| <member>.Generation
| <member>.Level
Syntax Description
<layer-namespecification>
A layer name can be specified in the following ways:
1. By specifying the generation or level names; for example, States or Regions.

The generation or level name can be within braces; for example, [Regions] . Usin
g braces is recommended.
2. By specifying the dimension name along with the generation or level name; for
example, Market.
Regions and [Market].[States] This naming convention is recommended.
<dimension>.Levels
(<index>)
Levels function with the dimension specification and a level number as input. Fo
r example, [Year].
Levels(0) .
Levels ( <dimension>,
<index> )
Alternate syntax forLevels function with the dimension specification and a level
number as input. For example,
Levels ( [Year], 0 ) .
<dimension>.
Generations (<index>)
Generations function with the dimension specification and a generation number as
input. For example,
[Year].Generations (3) .
Generations
( <dimension>,
<index> )
Alternate syntax for Generations function with the dimension specification and a
generation number as
input. For example, Generations ( [Year], 3) .
<member>.Generation Generation function with a member specification as input. Fo
r example, [Year].Generation. Returns
the generation of the specified member.
<member>.Level Level function with a member specification as input. For example,
[Year].Level. Returns the level of the
specified member.
MDX Member Specification
A member is a named hierarchical element in a database outline. Represent a memb
er using the
following rules:
Syntax
<member> ::=
<member-name-specification>
| <member_value_expression>
Member Name Specification
A member name can be specified in the following ways:
1. By specifying the actual name or the alias; for example, Cola, Actual, COGS,
and [100] .
If the member name starts with number or contains spaces, it should be within br
aces; for
example, [100] . Braces are recommended for all member names, for clarity and co
de
readability.

If the member name starts with an ampersand (&) , it should be within quotation
marks;
for example, ["&xyz"] . This is because the leading ampersand is reserved for su
bstitution
variables. You can also specify it as StrToMbr("&100") .
For attribute members, the long name (qualified to uniquely identify the member)
should
be used; for example, [Ounces_12] instead of[12] .
2. By specifying dimension name or any one of the ancestor member names as a pre
fix to the
member name; for example, [Product].[100-10] and [Diet].[100-10] This is a
recommended practice for all member names, as it eliminates ambiguity and enable
s you
to refer accurately to shared members.
Note: Use only one ancestor in the qualification. Essbase returns an error if mu
ltiple
ancestors are included. For example, [Market].[New York] is a valid name for
New York, and so is [East].[New York] . However, [Market].[East].[New
York] returns an error.
Member Value Expression
A member value expression is output from any function that returns a member. As
an alternative
to referencing the member by name or alias, you can use a function that returns
a member in
place of <member>. For a list of functions that return a member, see MDX Function
s on page
989.

Das könnte Ihnen auch gefallen