Go to primary content

Calculated Measure Expression Editor

Use this editor and the calculated measure templates and snippets to create or edit a calculated measure for an analytic view.

Expression Editor Page

Use the Expression Editor to define calculated measures.

To create a calculated measure, an easy way to begin is by copying a template from the Analytic View Templates and Snippets list. You can then either modify the code directly or modify the template at the bottom of the Expression Editor.

Snippets provide a quick way of adding a row function or a CASE expression to the calculated measure definition.

Displaying a Template

When you first insert an analytic function into the Expression Editor, the code appears at the top of the editor and the template appears at the bottom. If you edit the code directly, then the template disappears. If the code is invalid (that is, it cannot be compiled), then the template is disabled and cannot be displayed.

To display the template, select all of the code in the editor by doing one of the following:

  • Enter Ctrl+A.

  • Triple-click the primary mouse button.

  • Click and drag the cursor over the expression.

If a template for the calculation exists, it appears at the bottom of the code page.

To edit a calculated measure expression, either modify the code directly or select the entire expression to display the template. To change a value in the template, click the underlined value and select or enter a different value. The change is immediately reflected in the code.

To save a calculated measure:
  1. Enter an expression in the Expression Editor.

  2. From the File menu, click Save.

  3. To see an example of the use of the calculated measure, click the Run icon (Run).

    The example query and the results in appear in the Analytic View Data Viewer

Classifications Page

The classification page displays the FORMAT_STRING classification that you specified in the Measure Format field when you initially created the calculated measure. If the classification that you specified does not appear, click the Refresh Analytic View Metadata icon (Refresh Analytic View Metadata).

References Page

The References page displays the analytic view objects that the calculated measure references.

Dependencies Page

The Dependencies page displays the objects associated with the analytic view upon which the calculated measure depends.