WithAttrEx

The MDX WithAttrEx function for Essbase returns the set of base members that are associated with a specified varying attribute member or dimension, given the perspective setting and the predicate.

Syntax

WithAttrEx ( member, options, character_string_literal, value_expression, ANY, tuple|member[,tuple|member] )

Parameters

member

The top member of an attribute dimension.

character_string_literal

An operator. Must be enclosed in double quotation marks.

The following operators are supported:

  • > Greater than

  • >= Greater than or equal to

  • < Less than

  • <= Less than or equal to

  • = = Equal to

  • <> or != Not equal to

  • IN In

value_expression

An attribute value described by a value expression. The expression must evaluate to a numeric value for numeric/date attributes and must evaluate to a string for text valued attributes. Can also be an exact character string (not case-sensitive) enclosed in double quotation marks.

ANY

The keyword ANY.

tuple | member

Level 0 start tuple (or member) of the independent dimension set. The tuple must contain all the discrete dimensions followed by the continuous dimension members, in the same order that the continuous range has been defined.

tuple | member

Optional level 0 end tuple (or member) of the independent dimension set. The tuple must contain all the discrete dimensions followed by the continuous dimension members, in the same order that the continuous range has been defined.

Example

Consider the following scenario: Products are packaged under different ounces over time and the market state, according to the marketing strategy of the company. Ounces is defined as a varying attribute for the Product dimension, to capture the varying attribute association over the continuous Year dimension and the discrete Market dimension.

Year and Market are the independent dimensions, and level-0 tuple months (for example, Jan) combined with a market state (for example, California) is a perspective for which the varying attribute association is defined.

The following query analyzes sales performance of products packaged in units of 20 ounces or greater any time from Jan to Dec in New York, over all quarters. This is the perspective view, which restates the sales according to the packaging strategy in July.


WITH PERSPECTIVE (Jul) FOR Ounces
SELECT
 {Qtr1, Qtr2, Qtr3, Qtr4}
ON COLUMNS,
 {WithattrEx(Ounces, “>=”, 20, ANY, 
 ([New York], Jan), ([New York], Dec))}
ON ROWS
FROM app.db
WHERE 
 (Sales, Ounces, [New York])
;

See Also

AttributeEx