Parent

The MDX Parent function for Essbase returns a member's parent.

Syntax

member.Parent [(hierarchy) ]
Parent ( member [, hierarchy ] )

Parameters

member

A member specification.

hierarchy

Optional. A specific hierarchy within the time dimension.

Example

Example 1

SELECT 
 {Parent ([100-10])}
ON COLUMNS
FROM 
  sample.basic 

returns the parent of 100-10:

Table 4-121 Output Grid from MDX Example

100
30468

Example 2

The following 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-122 Output Grid from MDX Example

(axis) Sales
Qtr2 27187
Qtr3 28544
Qtr4 25355