> For the complete documentation index, see [llms.txt](https://docs.fabricplan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fabricplan.com/planning-sheets/reference/formula-syntax/logical-functions.md).

# Logical functions

Apply logical functions to test conditions and return *TRUE* or *FALSE* results. These functions are commonly used to evaluate expressions, validate data, and build conditional logic in reports. These functions are often used along with the [IF](/planning-sheets/reference/formula-syntax/conditional-statements.md#if) function.

### AND

The *AND* function returns *TRUE* only if all specified conditions are *TRUE*. If any condition evaluates to *FALSE*, the function returns *FALSE*. It is commonly used with IF and other conditional functions to evaluate multiple criteria.

#### Syntax

```
AND(logical_test1, [logical_test2], ...)
```

#### Arguments

* `logical_test1`: The first condition to evaluate.
* `logical_test2, ...` (optional): Additional conditions to evaluate.

#### Return value

Returns *TRUE* if all conditions are met; otherwise, returns *FALSE*.

#### Example

```
IF(AND(Sub Region == "APAC", Sub Category== "Juices"), 50000000, 0)
```

In this example, the *AND* function is used within an IF statement to assign values to the *2027 Actuals Plan*. The *AND* function evaluates whether both conditions are met: *Sub Region* is *APAC* and *Sub Category* is *Juices*. If both conditions are *TRUE*, the formula returns 50 *million*; otherwise, it returns *0*.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FgO9b9cYOIKKGvLrfFGAf%2Fimage.png?alt=media&amp;token=2357d300-da5c-4bb5-9807-d8c9eee57820" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[AND](https://support.microsoft.com/office/and-function-5f19b2e8-e1df-4408-897a-ce285a19e9d9)

### IN

The *IN* function returns *TRUE* if a specified value matches any value in a list or array. It returns *FALSE* if no match is found. It is commonly used with IF and other conditional functions to simplify multiple *OR* conditions.

#### Syntax

```
IN(value, [item1, item2, ...])
```

#### Arguments

* `value`: The value to check.
* `item1, item2, ...`: A required list of values to compare against.

#### Return value

Returns *TRUE* if a match is found; otherwise, returns *FALSE*.

#### Example

```
IF(IN(Sub Category,["Juices", 'Soda']), 52640000, 0)
```

In this example, the *IN* function is used within an IF statement to assign values to the *2027 Actuals Plan*. The function evaluates whether the *Sub Category* matches any value in the list: *Juices* or *Soda*. If a match is found, the formula returns 52.64 *million*; otherwise, it returns *0*.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FYCVwYqlDmf3megUW0yIN%2Fimage.png?alt=media&amp;token=056b6873-1ad8-4510-bed7-5252e259d973" alt=""><figcaption></figcaption></figure>

### ISBLANK

The *ISBLANK* function returns *TRUE* if the specified value is blank or empty. It returns *FALSE* if the value contains any text, number, or expression. It is commonly used with IF and other logical functions to validate missing values before performing calculations.

Note

The *ISEMPTY* function works similar to *ISBLANK* and can also be used to check for blank or empty values.

#### Syntax

```
ISBLANK(value)
```

#### Arguments

* `value`: The value to evaluate.

#### Return value

Returns *TRUE* if the value is blank; otherwise, returns *FALSE*.

#### Example

```
IF(ISBLANK(2027 Actuals Plan), 0, 2027 Actuals Plan)
```

In this example, the *ISBLANK* function checks whether the *2027 Actuals Plan* value is blank. If the condition is *TRUE*, the formula returns *0*; otherwise, it returns the existing value.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FqVcdwJ5ilOLzeqeluzIU%2Fimage.png?alt=media&amp;token=be64d70f-6fd3-4086-92b1-2f93103e38df" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[ISBLANK](https://support.microsoft.com/office/is-functions-0f2d7971-6019-40a0-a171-f2d869135665), [ISEMPTY](https://support.microsoft.com/office/isempty-function-a86d5871-f6bd-455c-9256-a69a42e55e50)

### ISNUMBER

The *ISNUMBER* function returns *TRUE* if the specified value is a valid number. It returns *FALSE* if the value is not numeric. It is commonly used with IF and other conditional functions to validate numeric inputs before performing calculations.

#### Syntax

```
ISNUMBER(value)
```

#### Arguments

* `value`: The value to evaluate.

#### Return value

Returns *TRUE* if the value is a numeric value; otherwise, returns *FALSE*.

#### Example

```
IF(ISNUMBER(Revenue), Revenue*1.05, "Not a number")
```

In this example, the *ISNUMBER* function checks whether *Revenue* contains a numeric value. If the condition is *TRUE*, the formula applies a 5% increase to the value; otherwise, it returns '*Not a number'*.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FGUKHtn2gNIPzROOZM2cE%2Fimage.png?alt=media&amp;token=55f4d796-686c-4e1d-899d-f1c40b53bbc8" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[ISNUMBER](https://support.microsoft.com/office/is-functions-0f2d7971-6019-40a0-a171-f2d869135665)

### ISREFEXIST

The *ISREFEXIST* function returns *TRUE* if the specified reference exists in the sheet. It returns *FALSE* if the reference is invalid or doesn't exist. It is commonly used to along with IF to validate references before applying calculations or logic.

#### Syntax

```
ISREFEXIST(reference)
```

#### Arguments

* `reference`: The reference to validate.

#### Return value

Returns *TRUE* if a valid reference exists; otherwise, returns *FALSE*.

#### Example

```
IF(ISREFEXIST(2026 Revenue Plan), 2026 Revenue Plan, "Reference doesn't exist")
```

In this example, the *ISREFEXIST* function checks whether the *2026 Revenue Plan* reference exists. If the condition is *TRUE*, the formula returns the value of the *2026 Revenue Plan*; otherwise, it returns the text *'Reference doesn't exist'*.

#### Excel equivalent

[ISREF](https://support.microsoft.com/office/is-functions-0f2d7971-6019-40a0-a171-f2d869135665)

### NOT

The *NOT* function returns the opposite of a logical value. It returns *TRUE* if the specified condition is *FALSE*, and *FALSE* if the condition is *TRUE*. It is commonly used with IF and other logical functions to invert conditions in calculations.

#### Syntax

```
NOT(logical_test)
```

#### Arguments

* `logical_test`: The condition to evaluate and reverse.

#### Return value

Returns *TRUE* if the condition is *FALSE* and *FALSE* if the condition is *TRUE*.

#### Example

```
IF(NOT(Sub Region == "APAC"), 52640000, 0)
```

In this example, the *NOT* function is used within an IF statement to assign values to the *2027 Actuals Plan*. The function evaluates whether *Sub Region* is **not***APAC*. If the condition is *TRUE*, the formula returns 52.64 *million*; otherwise, it returns *0*.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FhaqCZQs6yyNAQe4ZtYaS%2Fimage.png?alt=media&amp;token=6928b9e3-9e6f-4cfe-87fc-e25533d34e72" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[NOT](https://support.microsoft.com/office/not-function-9cfc6011-a054-40c7-a140-cd4ba2d87d77)

### OR

The *OR* function returns *TRUE* if at least one of the specified conditions is *TRUE*. It returns *FALSE* only when all conditions evaluate to *FALSE*. It is commonly used with IF and other conditional functions to evaluate multiple criteria.

#### Syntax

```
OR(logical_test1, [logical_test2], ...)
```

#### Arguments

* `logical_test1`: The first condition to evaluate.
* `logical_test2, ...` (optional): Additional conditions to evaluate.

#### Return value

Returns *TRUE* if any condition is met; otherwise, returns *FALSE*.

#### Example

```
IF(OR(Sub Region == "APAC", Sub Category == "Juices"), 52640000, 0)
```

In this example, the *OR* function is used within an IF statement to assign values to the *2027 Actuals Plan*. The function evaluates whether either condition is met: *Sub Region* is *APAC* or *Sub Category* is *Juices*. If at least one condition is *TRUE*, the formula returns 52.64 *million*; otherwise, it returns *0*.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FInZtJQhrlX8jqAfNPGIE%2Fimage.png?alt=media&amp;token=2322ce9b-9a56-483b-9abe-21dfa0d83139" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[OR](https://support.microsoft.com/office/or-function-7d17ad14-8700-4281-b308-00b131e22af0)

### XOR

The *XOR* (*Exclusive OR*) function returns *TRUE* if exactly one or an odd number of the specified conditions is *TRUE*. Otherwise, it returns *FALSE*. It is commonly used with IF and other logical functions to evaluate mutually exclusive conditions.

#### Syntax

```
XOR(logical_test1,[logical_test2], ...)
```

#### Arguments

* `logical_test1`: The first condition to evaluate.
* `logical_test2, ...` (optional): Additional conditions to evaluate.

#### Return value

Returns *TRUE* if an odd number of conditions are *TRUE*; otherwise, returns *FALSE*.

#### Example

```
IF(XOR(Sub Region == "APAC", Sub Category == "Juices"), 52640000, 0)
```

In this example, the *XOR* function is used within an IF statement to assign values to the *2027 Actuals Plan*. The function evaluates whether only one of the conditions is *TRUE*: *Sub Region* is *APAC* or *Sub Category* is Juices. If exactly one condition is *TRUE*, the formula returns *52.64 million*; otherwise, it returns *0*.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FjNGlOhmp37cRQkRZtmsn%2Fimage.png?alt=media&amp;token=cb588da1-67a9-4e34-9083-868e38bca403" alt=""><figcaption></figcaption></figure>

#### Excel equivalent

[XOR](https://support.microsoft.com/office/xor-function-1548d4c2-5e47-4f77-9a92-0533bba14f37)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.fabricplan.com/planning-sheets/reference/formula-syntax/logical-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
