Updated: March 2, 2016
Sorts a set in ascending order, and returns the specified number of tuples in the specified set with the lowest values.
BottomCount(Set_Expression, Count [,Numeric_Expression])
A valid Multidimensional Expressions (MDX) expression that returns a set.
A valid numeric expression that specifies the number of tuples to be returned.
A valid numeric expression that is typically a Multidimensional Expressions (MDX) expression of cell coordinates that return a number.
If a numeric expression is specified, this function sorts the tuples in the specified set according to the value of the specified numeric expression as evaluated over the set, in ascending order. The BottomCount function then returns the specified number of tuples with the lowest value.
If a numeric expression is not specified, the function returns the set of members in natural order, without any sorting, behaving like the Tail (MDX) function.
The following example returns the Reseller Order Quantity measure by for each calendar year for the bottom five Product SubCategory sales, ordered based on the Reseller Sales Amount measure.
SELECT BottomCount([Product].[Product Categories].[Subcategory].Members , 10 , [Measures].[Reseller Sales Amount]) ON 0, [Date].[Calendar].[Calendar Year].Members ON 1 FROM [Adventure Works] WHERE [Measures].[Reseller Order Quantity]