mdx

3
 MDX Dimension Specification Syntax <dimension> :: =  <dimension-name-specifica tion>  | <member>.DIMENSION  | <layer>.DIMENSION  | DIMENSION ( <member> | <layer> ) Syntax Description <dimension-name-specif ication> 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.

Upload: jeevan

Post on 04-Nov-2015

213 views

Category:

Documents


0 download

DESCRIPTION

dimension,layer,tuple specification

TRANSCRIPT

MDX Dimension SpecificationSyntax :: = | .DIMENSION | .DIMENSION | DIMENSION ( | )Syntax Description A dimension name. See Description, item 1..DIMENSION Dimension function with a member specification as input..DIMENSION Dimension function with a layer specification as input.DIMENSION ( | ) Alternate syntax. Dimension ( ) has the same effect as .Dimension.Dimension ( ) has the same effect as .Dimension.DescriptionA dimension can be represented in the following ways:1. Using the dimension name (the name of the top member of a dimension.) For example,[Market] .2. Using the Dimension function with a member of a dimension as input. For example,[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 SpecificationA layer is a shared depth in the outline hierarchy. Therefore, the concept of layer includesgenerations and levels. Represent a layer using the following rules:Syntax ::= | Levels ( , ) | .Levels ( ) | Generations ( , ) | .Generations ( ) | .Generation | .LevelSyntax Description

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] . Using 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..Levels()Levels function with the dimension specification and a level number as input. For example, [Year].Levels(0) .Levels ( , )Alternate syntax forLevels function with the dimension specification and a level number as input. For example,Levels ( [Year], 0 ) ..Generations ()Generations function with the dimension specification and a generation number as input. For example,[Year].Generations (3) .Generations( , )Alternate syntax for Generations function with the dimension specification and a generation number asinput. For example, Generations ( [Year], 3) ..Generation Generation function with a member specification as input. For example, [Year].Generation. Returnsthe generation of the specified member..Level Level function with a member specification as input. For example, [Year].Level. Returns the level of thespecified member.MDX Member SpecificationA member is a named hierarchical element in a database outline. Represent a member using thefollowing rules:Syntax ::= | Member Name SpecificationA 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 braces; forexample, [100] . Braces are recommended for all member names, for clarity and codereadability.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 substitutionvariables. You can also specify it as StrToMbr("&100") .For attribute members, the long name (qualified to uniquely identify the member) shouldbe used; for example, [Ounces_12] instead of[12] .2. By specifying dimension name or any one of the ancestor member names as a prefix to themember name; for example, [Product].[100-10] and [Diet].[100-10] This is arecommended practice for all member names, as it eliminates ambiguity and enables youto refer accurately to shared members.Note: Use only one ancestor in the qualification. Essbase returns an error if multipleancestors are included. For example, [Market].[New York] is a valid name forNew York, and so is [East].[New York] . However, [Market].[East].[NewYork] returns an error.Member Value ExpressionA member value expression is output from any function that returns a member. As an alternativeto referencing the member by name or alias, you can use a function that returns a member inplace of . For a list of functions that return a member, see MDX Functions on page989.