# MODE

The **MODE** function returns the value that appears most frequently in a dataset. It finds the value with the highest frequency and returns only one result.

### Syntax

```javascript
MODE(number1, [number2], ...)
```

### Arguments

The MODE function syntax has the following arguments:

* number1, number2, ... - The numbers or range of values for which you want to find the most frequent value. Required.

### Example

<pre class="language-javascript"><code class="lang-javascript"><strong>MODE(10, 20, 30, 20, 40)
</strong>// returns 20
<strong>MODE(5, 8, 5, 10, 8, 5)
</strong>// returns 5
</code></pre>

You can use the **MODE** function to determine the most common value in a dataset when analyzing frequently occurring metrics such as sales, scores, or costs.

{% hint style="warning" %}
If no values are repeated, the **MODE** function returns a **#VALUE!** error.
{% endhint %}

<figure><img src="/files/Owz4Le0znbrCJqFzGuJd" alt=""><figcaption><p>MODE function</p></figcaption></figure>

{% hint style="info" %}
We can also use 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

[MODE](https://support.microsoft.com/en-us/office/mode-function-e45192ce-9122-4980-82ed-4bdc34973120)


---

# 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/mode.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.
