Item dot function (MDX)

The Item dot function returns either a member of a tuple from a specified position within the tuple, or a tuple of a set from a specified position within the set.

Returns: A member or a tuple.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-+-SetExpression--.--Item--(--IndexExpression--)---+---------><
   '-TupleExpression--.--Item--(--IndexExpression--)-'   

Parameters

SetExpression
Specifies the set from which to return an item.
TupleExpression
Specifies the tuple from which to return an item.
IndexExpression
Specifies the offset within the set or tuple of the item to return.

Example

In this example, you want to see the last month that had sales activity, and the hierarchy of this month. The following query uses the Item function to return the sales amount for the last month in the cube that has a non-null value and all ascendants of that month.

Query
SELECT {[Price Analysis].[Measures].[Sales Amount]}

       ON AXIS(0),

       {Ascendants(Tail(Filter([Price Analysis].[Time].[Calendar Month Level 

			(Price Analysis)].Members, 

       Not IsEmpty([Price Analysis].[Time].CurrentMember))).Item(0))} 

       ON AXIS(1)

FROM [Price Analysis]
Result
Time Sales amount
10 95087.53
4 95087.53
2004 1003053.47
All Time (Calendar) 2719121.06


Feedback | Information roadmap