IsValid
The MDX IsValid function for Essbase returns TRUE if the specified element validates successfuly.
Syntax
IsValid ( member | tuple | set | layer | property )Parameters
- member
-
A member specification.
- tuple
-
A tuple specification.
- set
-
A set specification.
- layer
-
A layer specification.
- property
-
A property specification (see MDX Grammar Rules).
Example 1
The following example shows how IsValid can be used to check whether a given property value is valid. It returns all Product dimension members that have an Ounces attribute value of 12:
SELECT
Filter([Product].members,
IsValid([Product].CurrentMember.Ounces)
AND
[Product].CurrentMember.Ounces = 12)
ON COLUMNS
FROM Sample.BasicThe expression IsValid([Product].currentmember.Ounces) returns TRUE for only those members in the Product dimension that have a valid property value for [Ounces]. This eliminates ancestral members such as [Product] and [Colas] that do not have the [Ounces] property defined because they are not level-0 members of the Product dimension.
The second part of the AND condition in the filter selects only those members with a value of 12 for [Ounces].
The above query returns the following output:
Table 4-99 Output Grid from MDX Example
| 100-10 | 100-20 | 200-10 | 200-30 | 300-30 |
|---|---|---|---|---|
| 22777 | 5708 | 7201 | 4636 | 11093 |
Example 2
The following expression returns FALSE, because [Jan] is a level-0 member, therefore it does not have any children:
IsValid([Jan].FirstChild)