Using Substitution Variables in MDX Queries

Substitution variables act as global placeholders for information that changes regularly; you set the substitution variables on the server through Administration Services, MaxL, or ESSCMD and assign a value to each variable. You can change the value anytime. You must have the role of at least Database Manager to set substitution variables. See Using Substitution Variables.

  To use a substitution variable in an MDX expression, consider:

For example, the expression is written showing the variable name CurQtr preceded with the &:

SELECT 
  {[&CurQtr]}
ON COLUMNS
FROM Sample.Basic

When the expression is executed, the current value (Qtr1) is substituted for the variable name, and the expression that is executed is:

SELECT 
  {[Qtr1]}
ON COLUMNS
FROM Sample.Basic