# PERCENTRANKINC

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

{% hint style="info" %}
**PERCENTRANK** is the legacy version of the **PERCENTRANKINC** function and works similarly. It can be used in place of PERCENTRANKINC for inclusive percentage rank calculations.
{% endhint %}

### Syntax

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

### Arguments

The **PERCENTRANKINC** 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: The number of significant digits for the result. Optional.

{% hint style="success" %}
The result ranges from 0 to 1 (inclusive), where 0 represents the minimum value in the dataset and 1 represents the maximum value.
{% endhint %}

### Example

<pre class="language-javascript"><code class="lang-javascript"><strong>PERCENTRANKINC(10,20,30,40,50, 10)
</strong>// Returns 0
<strong>PERCENTRANKINC(10,20,30,40,50, 30)
</strong>// Returns 0.5
<strong>PERCENTRANKINC(10,20,30,40,50, 50)
</strong>// Returns 1
</code></pre>

You can use the **PERCENTRANKINC** function to determine the relative standing of a value within a dataset for metrics such as sales, revenue, or performance scores.

{% hint style="warning" %}

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

<p align="center">PERCENTRANKINC</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

[PERCENTRANKINC](https://support.microsoft.com/en-us/office/percentrank-inc-function-149592c9-00c0-49ba-86c1-c1f45b80463a)

### FAQs

**Q1. How is PERCENTRANKINC calculated?**

PERCENTRANKINC is calculated by determining the relative position of a value within a sorted dataset using the inclusive method, which includes both the minimum and maximum values in the calculation.

<p align="center"><strong>PERCENTRANKINC = (r-1) / (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 (inclusive) 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/percentrank.inc.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.
