MDX Layer Specification
In MDX, a layer is a shared depth in the outline hierarchy. Therefore, the concept of layer includes Essbase generations and levels. Represent a layer in MDX using the following syntax 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
Table 4-11 Ways to Specify a Layer in MDX
Syntax | Description |
---|---|
<layer-name-specification> |
A layer name can be specified in the following ways:
|
<dimension>.Levels (<index>) | Levels function with the dimension specification and a level number as input. For example, [Year].Levels(0) .
|
Levels ( <dimension>, <index> ) | Alternate syntax for Levels 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. For 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.
|
Description
Generation numbers begin counting with 1 at the dimension name; higher generation numbers are those that are closest to leaf members in a hierarchy.
Level numbers begin with 0 at the deepest part of the hierarchy; the highest level number is a dimension name.
![Description of ac_gnlv1.gif follows Description of ac_gnlv1.gif follows](img/ac_gnlv1.gif)
Description of the illustration ac_gnlv1.gif
Note:
In an asymmetric (or ragged) hierarchy, same level numbers does not mean that the members are at the same depth in the outline. For example, in the following diagram, member aa and member f are both level 0 members, and yet they are not at the same depth:
![Description of ac_gnlv2.gif follows Description of ac_gnlv2.gif follows](img/ac_gnlv2.gif)
Description of the illustration ac_gnlv2.gif