LastChild dot function (MDX)

The LastChild dot function returns the last child of the given member.

Returns: A member.

Syntax

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

Parameters

MemberExpression
Specifies the member whose last child is to be returned.

Example

The following example uses the LastChild function to return the sales amount for the last child of the year 2002, which is the fourth quarter of 2002.

Query
SELECT {[Price Analysis].[Measures].[Sales Amount]} ON AXIS(0),

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

FROM [Price Analysis]
Result
Time Sales amount
4 77383.1

Related functions

You can use the Children function to return a set of all of the children of a member, and the FirstChild function to return only the first child of a member.

You can reference other hierarchical relationships by using one of these syntactically similar functions: Siblings, FirstSibling, and LastSibling.



Feedback | Information roadmap