This documentation is archived and is not being maintained.


Returns the specified number of bottom-most rows, in increasing order of rank as specified by an expression.

BottomCount(<table expression>, <rank expression>, <count>)

An expression that returns a table, such as a <table column reference>, or a function that returns a table.

<table expression>

The value that is supplied by the <rank expression> argument determines the increasing order of rank for the rows that are supplied in the <table expression> argument, and the number of bottom-most rows that is specified in the <count> argument is returned.

The following example returns the predicted state of the Bike Buyer column in a singleton query. The query also returns the bottom two least likely states of the Bike Buyer attribute, based on the adjusted probability determined by the PredictHistogram function.

  [TM Decision Tree].[Bike Buyer],
  BottomCount(PredictHistogram([Bike Buyer]),$AdjustedProbability,2)
  [TM Decision Tree]
(SELECT 28 AS [Age],
  '2-5 Miles' AS [Commute Distance],
  'Graduate Degree' AS [Education],
  0 AS [Number Cars Owned],
  0 AS [Number Children At Home]) AS t