How do I calculate the percentile value of an observation in a series?

You can use one of the two following functions:

PercentRank(series, value)
PercentRank(series, value, length)

These formulas calculate the percentile of the variable “value” in the variable “series”.

The second formula has a variable “length” that allows you to calculate the percentile value on a rolling basis.

Examples:

PercentRank(sek, sek)
  • This calculates the percentile value of the series “sek” for each observation.

 

PercentRank(sek, 10)
  • This calculates the percentile value of the number “10” in the series “sek”.

 

PercentRank(sek, sek, YearsLength(3))
  • This calculates the percentile value of the series “sek” for each observation, on a rolling window of 3 years.