NextMember dot function (MDX)

The NextMember dot function returns the member that follows the specified member in its hierarchy.

Returns: A member.

Syntax

Read syntax diagramSkip visual syntax diagram
>>---MemberExpression----.--NextMember-------------------------><

Parameters

MemberExpression
Specifies the member that precedes the member that is to be returned.

Description

Use the NextMember dot function to refer to the member at the same level as the specified member that follows the specified member, regardless of whether they have the same parent. This function returns the next member at the same level with the specified member, according to the order of members in the hierarchy.

Example

The following example uses the function to retrieve the sales amount for the year 2002, the sales amount for the next member in the Calendar Year Level after the 2002 member, and the change between the two amounts.

Query
WITH

MEMBER [Price Analysis].[Measures].[Next Sales Amount] 

AS ([Price Analysis].[Time].NextMember, [Price Analysis].[Measures].[Sales Amount])

MEMBER [Price Analysis].[Measures].[Sales Change] 

AS [Price Analysis].[Measures].[Next Sales Amount] 

- [Price Analysis].[Measures].[Sales Amount]

SELECT {[Price Analysis].[Measures].[Sales Amount], 

[Price Analysis].[Measures].[Next Sales Amount], 

[Price Analysis].[Measures].[Sales Change]} ON AXIS(0)

, {[Price Analysis].[Time].[All Time (Calendar)].[2002]} ON AXIS(1)

FROM [Price Analysis]
Result
Time Sales Amount Next Sales Amount Sales Change
2002 871391.1 844676.49 -26714.61

Related functions

You can use the PrevMember dot function to refer to the member of a hierarchy that precedes a specified member.

You can use the CurrentMember dot function to refer to the current member of a hierarchy, in the context of some expression.

You can use the DefaultMember dot function to refer to the default member of a hierarchy, as the metadata of the cube defines it, or as the function infers it.



Feedback | Information roadmap