# COUNTIF

The **COUNTIF** function returns the count of values that match a specified condition.

### Syntax

```javascript
COUNTIF(list, condition)
```

### Arguments

* *list*: The list of values to evaluate.
* *condition*: The condition used to filter the values.

### Return value

Returns the number of values that satisfy the given condition.

### Example

```javascript
COUNTIF([[2024.Plan_Variance %], [2025.Plan_Variance %], [2026.Plan_Variance %]], ">0")
```

Returns the count of *Plan Variance %* values across *2024*, *2025*, and *2026* that are greater than 0.

<figure><img src="/files/BssnVXzQToVQD1HkQYCm" alt=""><figcaption></figcaption></figure>

### Excel equivalent

[COUNTIF](https://support.microsoft.com/en-us/office/countif-function-e0de10c6-f885-4e71-abb4-1f464816df34)


---

# 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/conditional-statements/countif.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.
