Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

BottomCount (MDX)

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])
Set_Expression

A valid Multidimensional Expressions (MDX) expression that returns a set.

Count

A valid numeric expression that specifies the number of tuples to be returned.

Numeric_Expression

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.

Important noteImportant

The BottomCount function, like the TopCount function, always breaks the hierarchy.

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.

Example

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]
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.