Expression Window for Views

Hierarchies - Hierarchies, levels, and attribute relationships that are part of the view definition will appear in the View Items and Function portion of the Expression window. They appear in the same order as in the view explorer and regardless of whether or not they are visible or actively showing in the grid.

Levels can be expanded to see the Attribute Relationships and Members folders. If attribute relationships were selected for the level, they will display when the Attribute Relationships folder is expanded.

  • Levels and Attribute Relationships - Click a level or attribute relationship to add it to the expression. Objects can also be drag and dropped into the Expression portion of the window.

  • Members - Another tool for building the expression is the Members folder. Click it to access the Select Filter Method window. From there, you can access the Select or Advanced Select Members window. This allows you to select specific members for the expression. Or, you can access the Named Set window and select a named set for the expression in cases when you are working with a single level time dimension.

When you add objects in this manner to the Expression, they are added in MDX format. That format includes a reference to the object dimension and hierarchy. The standard MDX format for objects commonly used in expressions follows.

  • Level - [Dimension name].[Hierarchy name].[Level name].members

  • Attribute Relationship - [Dimension name].[Hierarchy name].Properties("Attribute Relationship name")

  • Member - [Dimension name].[Hierarchy name].[Level name].[Member value]

You can also add objects to the expression by typing directly in the Expression portion of the window. For example expressions and MDX, see Creating Expressions for Calculated Measure Items.

Measure Items - The Measure Items section lists all the measure items associated with the view. Each measure item displays as Name (Caption). The name is the unique identifier associated with the measure item, which can be seen in the Properties window for the measure item. The caption makes it user friendly. They appear in the same order as in the view explorer.

You can include measure items as part of the expression using any of the following methods:

  • Select measure items by clicking or drag and drop.

  • Key in measure item names and captions directly in the Expression portion of the window in proper MDX format:

[Measures].[Name(Caption)]

where Name is the unique identifier that you can see for the measure item displayed in the Measure Items folder of the expression window and Caption is the text that identifies the measure item in the view (caption also shows next to the Name for the measure item in the Measure Items folder).

 For example expressions and MDX, see Creating Expressions for Calculated Measure Items.

Functions - A Functions folder provides you with logical, member, numeric, set, Stratum.Viewer-specific, tuple, and VBA functions that can be used for building the calculated or distinct calculated measure item expression. You can select a function by clicking, double clicking, or drag and drop. You can also key in a function directly in the Expression portion of the window.

If you select a function for your expression, then the formula for it will display in the Expression section and each parameter will be enclosed in double arrows (<< >>). Function parameters enclosed in double arrows, such as «PARAMETER», are required. Parameters enclosed in brackets and double arrows, such as [«PARAMETER»], are optional. You can highlight each parameter and type over it directly in the Expression section. Or you can click the needed element from the tree structure in the window and it will be inserted into that section of the function.

The Stratum.Viewer folder includes custom functions, such as cumulative and percent of total functions. If you use them in an expression, they will be preceded by a pound sign (#) to distinguish them from standard MDX functions. The Stratum.Viewer specific functions are:

  • ABC Cumulative Percent of Total

  • ABC Cumulative Total

  • Achievement Percent

  • Cumulative Percent of Total

  • Cumulative Total

  • Divide With Zero Check

  • Percent of Change

  • Percent of Total

  • Total

There are pop-up labels for all functions, and they give you a brief description of the functions.

Expression - This section shows the MDX expression for the measure item, level filter, or axis filters. 

Note: Objects not visible in a view or not part of a view definition can be used in an expression by manually entering them into the Expression portion of the window. You must refer to them by their valid MDX format and they must exist in the cube associated with the view.

Filter Type – When you access this window from a view to create a level filter, it will include this button. Click to access the Select Filter Method window if you need to apply a different type of filter to the level (Member List, User List, Named Set).

Validate - Click the Validate button at any point while you are building the expression. Stratum.Viewer will verify whether or not the format of your expression is valid. If you do not click the Validate button while building the expression, then validation will be performed once you click the OK button.