MicroStrategy ONE

Percentile

Returns the nth percentile of values in a given range. This function can be used to establish thresholds indicating, for example, which states have revenue above the 75th percentile for their region. This is a group-value function.

Syntax

Percentile <Ascending, FactID> (Argument, Percent)

Where:

  • Ascending is a TRUE/FALSE parameter that indicates the organization of the data.
  • Argument is an attribute, fact or metric representing a list of numbers.
  • Percent is the decimal value of the percent for which you want to use as a threshold.

Example

Example 1: If you have an argument containing the values 1, 2, 3, and 4 and you want to find the threshold of the 3oth percentile, the syntax is as follows:

Percentile ({1, 2, 3, 4}, 0.3) = 1.9

1.9 is the level of the 30th percentile. All values above 1.9 are greater than the 30th percentile.

Example 2: This example shows a report where only states with Total Revenue greater than the threshold for the 75th percentile in its region are displayed. The report contains the attributes Customer Region and Customer State, and the metrics Total Revenue and Percentile. A view filter is then applied to the report so that it only displays states where Total Revenue is greater than Percentile.

The syntax for the Percentile metric is as follows:

Percentile([Total Revenue], .75){[Customer Region]}