WithAttr
The MDX WithAttr() function for Essbase returns all base members that are associated with an attribute member of the specified type.
Syntax
WithAttr ( member, character_string_literal, value_expression )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 -
INIn
-
- 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.
Example
The following MDX query:
SELECT
Withattr([Pkg Type], "==", "Can")
on columns
FROM Sample.Basicreturns products that are packaged in a can:
Table 4-139 Output Grid from MDX Example
| Cola | Diet Cola | Diet Cream |
|---|---|---|
| 22777 | 5708 | 11093 |
See Also