CurrentMember
The MDX CurrentMember function for Essbase returns the current member in the input dimension.
The current member is evaluated in the context of query execution mechanics. Used in conjunction with iterative functions such as Filter, at every stage of iteration the member being operated upon is the current member.
Syntax
dimension.CurrentMember
CurrentMember ( dimension )
Notes
This function returns the child of an implied shared member instead of the member itself. To avoid this behavior when using CurrentMember in MDX formulas and calculated members, tag the parent with the "Never Share" property.
An implied share occurs when a parent has only one child, or only one child that consolidates.
Example
The following query selects the quarters during which sales growth is 3% or more compared to the previous month.
SELECT
Filter (
[Year].Children, -- outer loop
Max (
Except (
[Year].CurrentMember.Children, -- current in outer loop
{ [Year].[Jan] }
),
( [Year].CurrentMember -- current in Max loop
/ [Year].CurrentMember.PrevMember)
) >= 1.03
)
ON axis(0)
FROM Sample.Basic
WHERE ([Measures].[Sales])
Returns the grid:
Table 4-53 Output Grid from MDX Example
Qtr2 | Qtr4 |
---|---|
101679 | 98141 |