MDX Tutorials - MDXTutorials.net

MDX Identifers in SSAS


Identifiers

Identifiers are the names of individual SSAS objects. Every object has an identifier. Cubes, Members, Hierarchies, Dimensions, etc, are all objects, and thus all require identifiers. In order to reference and object you use the MDX identifier.

Regular Identifiers

The first character of an identifier must be a Latin letter a-z and A-Z or an (_) underscore. The remainder of characters in the identifier can be a Latin letter a-z and A-Z, underscore, or a decimal number. The identifier cannot be a reserved keyword and cannot contain an embedded spaces or special characters.

Example of usage:


SELECT State.City.CHILDREN ON COLUMNS,

Measures.MEMBERS ON ROWS

FROM TestCube

Delimited Identifiers

You will have to use a delimited identifier if any of the following apply:

  • If the name of an object uses characters not listed above as proper identifiers. An example of this would be if a space is used in the identifier.

  • If the identifier name is a reserved word.

The syntax for using delimited identifiers is to being the name with a left bracket "[" and end the name with a right bracket "]".

Examples of usage:
SELECT [New Jersey].Trenton.CHILDREN ON COLUMNS,

Measures.MEMBERS ON ROWS

FROM TestCube

New Jersey contains an embedded space between New and Jersey.


SELECT Bird.[Nest].CHILDREN ON COLUMNS,
Measures.MEMBERS ON ROWS

FROM TestCube

Nest is a reserved keyword.


Copyright 2012 - MDXTutorials.net