Returns one member from set with specified position (starting from zero) or name.
Syntax
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
Following example returns all Projects that do not have component "UI".
Aggregate(Filter([Project].[Project].Members,
[Project].CurrentMember.Children.Item('UI') IS NULL
))
[Project].CurrentMember.Children
returns all project components that are Project dimension Children
..Item('UI')
returns component with name "UI"NULL
will be returned. In that way IS NULL
filters projects that do not have component "UI". 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.
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')
See also