Returns a member's parent.
Syntax
member.Parent [(hierarchy) ]
Parent ( member [, hierarchy ] )
Parameter | Description |
---|---|
A member specification. | |
Optional. A specific hierarchy within the time dimension. |
Example
SELECT {Parent ([100-10])} ON COLUMNS FROM sample.basic
returns the parent of 100-10:
100 |
---|
30468 |
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:
(axis) | Sales |
---|---|
Qtr2 | 27187 |
Qtr3 | 28544 |
Qtr4 | 25355 |