BottomPercent

Returns the smallest possible subset of a set for which the total results of a numeric evaluation are at least a given percentage. The result set is returned with elements listed from smallest to largest.

Syntax

BottomPercent ( set, percentage, numeric_value_expression )
ParameterDescription

set

The set from which the bottom-percentile elements are selected.

percentage

The percentile. This argument must be a value between 0 and 100.

numeric_value_expression

The expression that defines the selection criteria (see MDX Grammar Rules).

Notes

This function ignores negative and missing values.

Example

The following query returns data for products making up the lowest 5th percentile of all product sales in the Sample Basic database.

WITH
 SET [Lowest 5% products] AS
  'BottomPercent (
   { [Product].members },
   5,
   ([Measures].[Sales], [Year].[Qtr2])
   )'

MEMBER 
 [Product].[Sum of all lowest prods] AS
 'Sum ( [Lowest 5% products] )'

MEMBER [Product].[Percent that lowest sellers hold of all product sales] AS
 'Sum ( [Lowest 5% products] ) / [Product] '

SELECT
 {[Year].[Qtr2].children}
on columns,
 {
  [Lowest 5% products],
  [Product].[Sum of all lowest prods],
  [Product],
  [Product].[Percent that lowest sellers hold of all product sales]
 }
on rows
FROM Sample.Basic
WHERE ([Measures].[Sales])

In the WITH section,

This query returns the following grid:

(axis)AprMayJun
Birch Beer9549171051
Caffeine Free Cola104910651068
Strawberry131413321316
Sarsaparilla150915521501
Vanilla Cream149315331612
Sum of all lowest prods631963996548
Product329173367435088
Percent that lowest sellers hold of all product sales0.1920.1940.187