Expression Window For Filters

View Items and Functions for Expression – Use this part of the window to select items or functions to use in building an expression for a filter on a level or an axis filter in the view. Click items or drag and drop them to use them in the Expression section.

Objects available to work with as you build your filter expression are described below.

Hierarchies Folder – Hierarchies, levels, and attribute relationships that are part of the view definition are in list in the Hierarchies folder. 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.

The Levels folder 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]

Measure ItemsFolder – The Measure Items folder 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).

MDX Functions Folder – A Functions folder provides you with logical, member, numeric, set, Stratum.Viewer-specific, tuple, and VBA functions that can be used for building the filter 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.

Stratum.Viewer Functions Folder – This folder includes custom Stratum.Viewer functions that serve as shortcuts for building commonly used calculations, 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 Subtotal

  • Percent of Total

  • Total

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

Expression – Use this part of the window to build the expression for a filter on a level or an axis filter in the view. The MDX for objects selected from the View Items and Functions for Expression portion of the window display in this part of the window as you add them – add by clicking them or dragging and dropping them. You can also add objects to the expression by typing directly in the space provided in the Expression section of the window. Click the Examples link to see examples of expressions for different types of filters on levels or an axis in a view.

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 filter for a level, it will include a Filter Type button. Click it 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).

OK / Validate / Cancel – Click the Validate button at any point while you are building the expression. Stratum.Viewer will verify that 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. Click OK to apply the expression filter.

Help – Click to access examples of expressions for level or axis filters.