Returns the smallest possible subset of a set for which the total results of a numeric evaluation are at least a given sum. Elements of the result set are listed from smallest to largest.
BottomSum ( set, numeric_value_expression, numeric_value_expression )
| set | The set from which to select the lowest-summing elements. |
| numeric_value_expression1 | The given sum. |
| numeric_value_expression2 | The numeric evaluation. |
The following query selects Qtr1 and Qtr2 sales for the lowest selling products in Qtr1 (where Sales totals at least 10000).
SELECT
{[Year].[Qtr1], [Year].[Qtr2]}
ON COLUMNS,
{
BottomSum(
[Product].Members, 10000, [Year].[Qtr1]
)
}
ON ROWS
FROM Sample.Basic
WHERE ([Measures].[Sales])
This query returns the grid:
| Qtr1 | Qtr2 | |
|---|---|---|
| 200-40 | 2807 | 2922 |
| 100-30 | 3187 | 3182 |
| 400-30 | 3763 | 3962 |
| 300-20 | 4248 | 4638 |
| ©2004 Hyperion Solutions Corporation. All Rights Reserved. http://www.hyperion.com |