Using the DeepSee Analyzer
Defining Calculated Elements
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

This chapter describes how to define calculated elements. This chapter discusses the following topics:

These calculated elements can be saved as part of a pivot table definition (and are then usable only in that pivot table) or can be saved in a shared area (and are then usable in any pivot table based on the same cube).
Overview
Often it is convenient to combine existing model elements into new elements. In DeepSee, you can add two kinds of calculated elements:
In MDX, a measure is considered to be a member, and both kinds of calculated elements are considered to be calculated members. This book uses the phrase calculated measure to refer to a calculated member that is a measure.
Defining a Calculated Measure
To define a measure that is based on other measures:
  1. If you intend to define this measure only in a given pivot table, save that pivot table.
  2. Click the Calculated Element button .
    The system displays the following dialog box (partially shown here):
  3. For Member Type, click Measure.
    When you do so, the system automatically selects Measures for the Dimension option.
  4. Optionally select Shared Storage. DeepSee uses this option as follows:
  5. For Member name, type the name of the new measure.
  6. Specify the MDX expression that defines the new member. To do so, you can do either of the following:
    For an introduction to these expressions, see the first subsection.
  7. Optionally specify the following additional options:
  8. Click OK.
The new member is then displayed within the Measures section in the Model Contents pane:
You can then use this measure in the same way you use any other measure.
Measure Expressions
The measure expression can include the following elements:
For other variations and specific recipes, see Defining Calculated Members in Defining DeepSee Models.
Solve Order
The Solve Order option is useful if your pivot table has a calculated member (either measure or non-measure) as a column and a conflicting calculated member as a row.
This option affects how the system determines the value in the cell and the format applied to the cell. By default:
If you instead want the row to determine the format and the value, ensure that Solve Order is higher for the calculated member used as a row.
With one exception, the calculated member with the higher Solve Order is evaluated last and thus controls the results. The exception is that if a row or column uses the %CELL function, its implicit default Solve Order is 10.
If the row and column both use %CELL and you want the row to determine the value and format string, set the Solve Order to 11 for the row.
If the column and row members have the same Solve Order, the column member controls the results, as in the default case.
Tip:
For calculated measures that depend on other calculated measures, the system recognizes the dependencies and evaluates the measures in the appropriate order. You do not need to use Solve Order for these measures.
Defining a Calculated Member That Is Not a Measure
To define a calculated member based on other members:
  1. If you intend to define this member only in a given pivot table, save that pivot table.
  2. Click the Calculated Element button .
  3. For Member Type, click Dimension.
  4. Optionally select Shared Storage. DeepSee uses this option as follows:
  5. For Dimension, either select a dimension or type the name of a new dimension. For example: Calculated
    You can specify any dimension, including an existing dimension that includes non-calculated members or a new dimension.
  6. For Member, type the name of the new member.
  7. Specify the MDX expression that defines the new member. To do so, you can do any of the following:
    These expressions are discussed later in this section.
  8. Optionally specify the following additional options:
  9. Click OK.
The new member is then available in the Dimensions section in the Model Contents pane:
If you added the member to an existing dimension, the system lists it within every level of that dimension. If you added it to a new dimension, that new dimension is displayed at the bottom of this pane. For example, the following shows a new dimension with two calculated members:
You can then use these members the same way that you use other members.
In a typical case, you define a new member that combines other members. In these cases, use one of the following syntaxes:
For other variations and specific recipes, see Defining Calculated Members in Defining DeepSee Models.
Redefining a Calculated Member
To redefine a calculated member:
  1. Select the calculated member in the Model Contents pane.
  2. Click the Calculated Element button .
  3. Make changes as needed.
Deleting a Calculated Member
To delete a calculated member:
  1. Select the calculated member in the Model Contents pane.
  2. Click the X button.
  3. Click OK to confirm this deletion.