# PERCENTRANKEXC

The **PERCENTRANKEXC** function returns the percentage rank of a value within a dataset using the exclusive method. It indicates the relative position of a value compared to other values and excludes the minimum and maximum values in the calculation.

### Syntax

```javascript
PERCENTRANKEXC(array, x, [significance])
```

### Arguments

The **PERCENTRANKEXC** function syntax has the following arguments:

* array: The range or list of numeric values. Required.
* x: The value for which you want to calculate the percentage rank. Required.
* significance (optional): The number of significant digits for the result. Optional.

{% hint style="success" %}
The result ranges from greater than 0 and less than 1 (exclusive). It does not return 0 or 1 because the minimum and maximum values are excluded from the calculation.
{% endhint %}

### Example

<pre class="language-javascript"><code class="lang-javascript"><strong>PERCENTRANKEXC(10,20,30,40,50, 30)
</strong>// Returns 0.5
<strong>PERCENTRANKEXC(10,20,30,40,50, 20)
</strong>// Returns 0.25
<strong>PERCENTRANKEXC(10,20,30,40,50, 40)
</strong>// Returns 0.75
</code></pre>

You can use the **PERCENTRANKEXC** function to determine the relative standing of a value within a dataset when excluding the minimum and maximum values, especially when working with sample data.

{% hint style="warning" %}

* If the value being ranked is less than the minimum in the specified array, the **PERCENTRANKEXC** function returns 0.
* If the value being ranked is greater than the maximum in the specified array, the function returns an **#ERR** error.
  {% endhint %}

<p align="center">PERCENTRANKEXC</p>

{% hint style="info" %}
We used the [**SELECT**](/planning-sheets/formula-syntax/measure-column-selection-functions/select.md) function to select a range of columns from 1 to 4 for the 'Revenue' measure (2022 Revenue - 2025 Revenue)
{% endhint %}

### Excel Equivalent

[PERCENTRANKEXC](https://support.microsoft.com/en-us/office/percentrank-exc-function-d8afee96-b7e2-4a2f-8c01-8fcdedaa6314)

### FAQs

**Q1. How is PERCENTRANKEXC calculated?**

PERCENTRANKEXC is calculated by determining the relative position of a value within a sorted dataset using the exclusive method, which excludes the minimum and maximum values in the calculation.

<p align="center"><strong>PERCENTRANKEXC = r / (n+1)​</strong></p>

Where:

* r = rank position of the value in the sorted dataset
* n = number of values in the dataset

If the value does not exactly match an existing value, the result is obtained by interpolating between the surrounding values.

It returns a value between 0 and 1 (exclusive) representing the relative standing of the value in the dataset.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fabricplan.com/planning-sheets/formula-syntax/statistical-functions/percentrankexc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
