Item
Returns one member from set with specified position (starting from zero) or name.
Syntax
CODE
Index syntax
Set_Expression.Item(index)
String expression syntax
Set_Expression.Item(String_Expression1 [ ,String_Expression2,...n])
Arguments
Set_Expression | MDX expression that returns set. |
---|---|
index | Numeric expression that specifies the position of tuple in the set. |
String_Expression | String expression that is a typically a tuple expressed in a string. |
Examples
In the following example item function can be used to return the first element in a sorted member list to get the last invoice date for the current customer.
CODE
Order(
Filter(
[Invoice].[Invoice].members,
[Invoice].CurrentMember.getString('Customer code') = [Customer].CurrentMember.getString('KEY')
),
[Invoice].CurrentMember.get('Invoice date'),
DESC
).Item(0).get('Invoice date')