MDX Comments
Learn how to add comments to MDX queries for Essbase.
Syntax
MDX supports two types of syntax for comments:
-
MDX supports the "C++ style" comments that are also supported by the Essbase Server calculator framework. This type of comment can cover multiple lines. Everything in between is ignored by the MDX parser.
Example:
/* commented text is ignored by parser */
-
MDX supports inline comments beginning with two hyphens. Beginning with two hyphens, the rest of the line is ignored by the MDX parser. A new line ends the span of the comment.
Example:
-- short comment can go on till line break
Example
The following example uses both styles of comments:
/* Query the profit figures in each
market for the "100" products
*/
SELECT
{([Market].levels(1).members)} --L1 members of Market
ON COLUMNS,
--Cross of the "100" products and their profit figures:
CrossJoin ([100].children, [Profit].children)
ON ROWS
FROM Sample.Basic