Returns the `N` th percentile of all values of `X`. `N` is a floating point value between 0 and 100.

## Sample usage

`PERCENTILE(Users per day, 50)`

## Syntax

`PERCENTILE( X, N )`

### Parameters

- `X` - a numeric field or expression.
- `N` - a number in the range 0 to 100.

### Notes

- `X` cannot be an aggregated field or the result of an aggregation function.
- `N` can be a decimal value.

## Example

| Example formula | Input | Output |
|---|---|---|
| ` PERCENTILE(Users per day, 50) ` | - 95 - 100 - 92 | 95 |
| ` PERCENTILE(Users per day, 30.5) ` | - 95 - 100 - 92 | 93.83 |

## Notes

For BigQuery data sources, `PERCENTILE` is implemented using the BigQuery [APPROX_QUANTILES](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/approximate_aggregate_functions#approx_quantiles) function. Applying `PERCENTILE` to data coming from BigQuery may return slightly different results than applying `PERCENTILE` to the same data coming from other data source types.

## Related resources

- [Calculated fields](https://docs.cloud.google.com/data-studio/about-calculated-fields)
- [Data Studio function list](https://docs.cloud.google.com/data-studio/function-list)