Creating User-Defined Expressions

Among the calculation types is a user-defined expression. It enables you to create calculations using the OLAP expression syntax, which includes the following elements:

The OLAP syntax is an extension of the SQL syntax. If you have used SQL analytic functions or row functions, this syntax will be familiar to you.

The easiest way to formulate an expression is to let Analytic Workspace Manager do the work for you. You can use the templates to create a similar calculation, and cut-and-paste the syntax into an expression.

To create an expression:

  1. Open the Create Calculated Measure dialog box.
  2. Select the calculation type that most closely matches the one you want to define.
  3. Modify the template as desired.
  4. Cut-and-paste the calculation from the Calculation box into a text editor.
  5. Repeat these steps if your calculation uses two or more functions.
  6. Modify the calculation as desired in the text editor. You can combine numeric operators, analytic functions, and single-row functions in a single calculation.
  7. From the Calculation Types list, select Expression.
  8. Cut-and-paste the calculation from the text editor into the Calculation box.
  9. Click Create.

Related Topics

OLAP Expression Syntax: Analytic Functions
OLAP Expression Syntax: Row Functions
OLAP Expression Syntax: Syntax Elements