Using the order of members existing in a database outline, returns the next member along the same generation or level.
member.NextMember [( layertype ) ]
OR
NextMember ( member [,layertype ] )
| member | The starting member from which .NEXTMEMBER counts one member forward. |
| layertype |
GENERATION or LEVEL. The default is Generation.
|
If the next member is not found, this function returns an empty member. For example,
using Sample Basic, these would return an empty member: Qtr4.nextmember
and Year.nextmember.
The following expression:
[Jun].nextmember
returns the member that is one step further than Jun:
[Jul]
The following query
/*
For January, PrevMember doesn't exist
For December, NextMember doesn't exist
*/
WITH
MEMBER
[Measures].[Delta from Previous Month]
AS
' [Measures].[Sales] -
([Measures].[Sales],[Year].CurrentMember.PrevMember)
'
MEMBER [Measures].[Delta from Next Month]
AS
' [Measures].[Sales] -
([Measures].[Sales], [Year].CurrentMember.NextMember)
'
SELECT
{ [Measures].[Sales],
[Measures].[Delta from Previous Month],
[Measures].[Delta from Next Month]
}
ON COLUMNS,
[Year].Levels(0).Members
ON ROWS
FROM Sample.Basic
WHERE
(
[Scenario].[Actual],
[Market].[East],
[Product].[100]
)
returns the grid:
| Sales | Delta from Previous Month | Delta from Next Month | |
|---|---|---|---|
| Jan | 2105 | 2105 | 44 |
| Feb | 2061 | -44 | -65 |
| Mar | 2126 | 65 | -132 |
| Apr | 2258 | 132 | -89 |
| May | 2347 | 89 | -278 |
| Jun | 2625 | 278 | -110 |
| Jul | 2735 | 110 | 62 |
| Aug | 2673 | -62 | 311 |
| Sep | 2362 | -311 | 268 |
| Oct | 2094 | -268 | 28 |
| Nov | 2066 | -28 | -222 |
| Dec | 2288 | 222 | 2288 |
| ©2004 Hyperion Solutions Corporation. All Rights Reserved. http://www.hyperion.com |