> 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/documentation/plan/planning-sheets/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.

### In this category

<table><thead><tr><th width="138">Function</th><th width="543">Description</th><th data-hidden>SYNTAX</th><th data-hidden>EXPLANATION</th><th data-hidden>EXAMPLE</th></tr></thead><tbody><tr><td><a href="/pages/P6N0doSC1PFoNpCmBvEn">AND</a></td><td>Returns TRUE only if all conditions are TRUE.</td><td></td><td></td><td></td></tr><tr><td><a href="/pages/bxrdTCnz4iqwTAxkLNzT">OR</a></td><td>Returns <em>TRUE</em> if any condition is <em>TRUE</em>; returns <em>FALSE</em> only if all conditions are <em>FALSE</em>.</td><td>OR( logical_test1, [logical_test2], ... )</td><td>Will return 25 if the region is West or East otherwise returns 30</td><td>IF(OR(Region == "West", Region =="East"), 25, 30)</td></tr><tr><td><a href="/pages/Yo9eM1NYF4GmTQJzZtKk">NOT</a></td><td>Returns the opposite logical value of the argument.</td><td>NOT( logical_test )</td><td>Will return 50 if the region is not West otherwise returns 25</td><td>IF(NOT(Region == "West"), 50, 25)</td></tr><tr><td><a href="/pages/atCcWniv5j24vVzCjKsu">XOR</a></td><td>Returns <em>TRUE</em> if the number of satisfied conditions is odd, and <em>FALSE</em> if it is even.</td><td>XOR( logical_test1, [logical_test2], ... )</td><td>Will return 25 for all category in the West except for category Urban, and returns 25 for all Urban category under all region except for west, for all other items returns 30</td><td>IF(XOR(Region == "West", Category=="Urban"), 25, 30)</td></tr><tr><td><a href="/pages/hnfkKtUDry7uYYkqSbMN">IN</a></td><td>Returns <em>TRUE</em> if the specified value exists in a list or array.</td><td></td><td></td><td></td></tr><tr><td><a href="/pages/xwYXz9yPz1Y6m1fpK2LH">ISBLANK</a></td><td>Returns <em>TRUE</em> if the specified value is blank or empty.</td><td>ISBLANK(value)</td><td>Returns TRUE if AC is empty</td><td>ISBLANK(AC)</td></tr><tr><td><a href="/pages/xwYXz9yPz1Y6m1fpK2LH">ISEMPTY</a></td><td>Returns <em>TRUE</em> if the specified value is blank or empty. It works similar to ISBLANK.</td><td>ISEMPTY(value)</td><td>Returns TRUE if AC has no value</td><td>ISEMPTY(AC)</td></tr><tr><td><a href="/pages/kxKdlOJYXGJvrGISXVzk">ISNUMBER</a></td><td>Returns <em>TRUE</em> if the specified value is a valid number.</td><td>ISNUMBER(value)</td><td>Returns AC-PY/PY if the value is a number else returns 0</td><td>IF(ISNUMBER((AC-PY)/PY), (AC-PY)/PY , 0)</td></tr><tr><td><a href="/pages/q3VkPQYAADLjTYE1oNIe">ISREFEXIST</a></td><td>Returns <em>TRUE</em> if the specified reference exists in the model.</td><td></td><td></td><td></td></tr></tbody></table>

### Logical Operators

<table><thead><tr><th width="174.33333333333334">TITLE</th><th>OPERATORS</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>AND</td><td>&#x26;&#x26;</td><td>Logical AND</td></tr><tr><td>OR</td><td>||</td><td>Logical OR</td></tr><tr><td>XOR</td><td>^</td><td>Logical Exclusive OR</td></tr></tbody></table>


---

# 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/documentation/plan/planning-sheets/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.
