Parent
The MDX Parent() function for Essbase returns a member's parent.
Syntax
member.Parent [(hierarchy) ]
or
Parent ( member [, hierarchy ] )
Parameters
Example 1
{Parent ([100-10])}
returns [100], which is the parent of 100-10.
Example 2
The following MDX query uses Filter to find the months in which Sales for [Product].[100] are higher than 8,570. The Parent function is used with Generate to create a set consisting of the parents (quarters) of the high-sales months:
WITH SET [High-Sales Months] as
'
Filter(
[Year].Levels(0).members,
[Measures].[Sales] > 8570
)
'
SELECT
{[Measures].[Sales]}
ON COLUMNS,
Generate([High-Sales Months], { Parent([Year].CurrentMember) })
ON ROWS
FROM
sample.basic
WHERE
([Product].[100])
This query returns the grid:
Table 4-121 Output Grid from MDX Example
(axis) | Sales |
---|---|
Qtr2 | 27187 |
Qtr3 | 28544 |
Qtr4 | 25355 |