Percentile

The Percentile function returns the nth percentile of values in a column of numbers.

Percentile (numbers, n, break_col)

where:

numbers references the column that contains the numbers on which the percentile is calculated.

n is the percentile value 0 to 1 inclusive.

break_col is an optional parameter that references a break column.

Note:

Percentile can also be used to return quartile values by setting the nth percentile to the following: 0.25 for first quartile, 0.5 for second quartile, 0.75 for third quartile.

The following examples show the results of inserting the Percentile function in three separate tables.

Example 1

In this example, two computed value columns have been calculated. In the first computed column, the Percentile function is used on the numeric column and the nth percentile of values (.80 in this case).

Percentile (Units, .80)

In the second computed column, the Percentile function is used on the numeric column, the nth percentile of values (.80 in this case), and the break_column.

Percentile (Units, .80, State)

Table 163. Percentile Example 1

State

Units

Computed 1

Computed 2

WI

50

191.8

50

AZ

70

191.8

70

CA

96

191.8

99.8

CA

98

191.8

99.8

CA

101

191.8

99.8

FL

112

191.8

112

MD

159

191.8

159

NY

241

191.8

440.2

NY

490

191.8

440.2

Example 2

In this example, two computed value columns have been calculated. In the first computed column, the Percentile function is used on the numeric column and the nth percentile of values (0 in this case).

Percentile (Units, 0)

In the second computed column, the Percentile function is used on the numeric column, and the nth percentile of values (.25 in this case).

Percentile (Units, .25)

Table 164. Percentile Example 2

State

Units

Computed 1

Computed 2

WI

50

50

96

AZ

70

50

96

CA

96

50

96

CA

98

50

96

CA

101

50

96

FL

112

50

96

MD

159

50

96

NY

241

50

96

NY

490

50

96