MDX-How do you extract first tuple from the set?
Q: How do you extract first tuple from the set?
A: Use could usefunction Set.Item(0)
Lets run query that has Calendar year set on axis 0:
SELECT {[Date].[Calendar].[Calendar Year].Members
}
ON 0
FROM [Adventure Works]
Results:
CY 2001 CY 2002 CY 2003 CY 2004
$8,065,435.31 $24,144,429.65 $32,202,669.43 $16,038,062.60
Now lets take first member of the set:
SELECT {{[Date].[Calendar].[Calendar Year].Members
}.Item(0)}
ON 0
FROM [Adventure Works]
Result:
CY 2001
$8,065,435.31