# MODESNGL

The **MODESNGL** function works similarly to the MODE function and returns the single most frequently occurring value in a dataset. When multiple values are repeated, it returns the first number that appears the most frequently.&#x20;

### Syntax

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

### Arguments

The MODESNGL 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>MODESNGL(10, 20, 30, 20, 40)
</strong>// returns 20
<strong>MODESNGL(5, 8, 5, 10, 8, 5, 8)
</strong>// returns 5
</code></pre>

If multiple values share the highest frequency, the function returns the first one encountered.

You can use the **MODESNGL** 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 **MODESNGL** function returns a **#VALUE!** error.
{% endhint %}

<figure><img src="/files/Jqd5l5Cb2mPoqMXpOKGG" alt=""><figcaption><p>MODESNGL 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

[MODESNGL](https://support.microsoft.com/en-us/office/mode-sngl-function-f1267c16-66c6-4386-959f-8fba5f8bb7f8)


---

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