> For the complete documentation index, see [llms.txt](https://docs.cascade.io/cascade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cascade.io/cascade/functions-and-expressions/functions/logical/ifs.md).

# IFS

IFS( `condition`, `then`, `[condition2, then2, ...]`, `else` )

Tests multiple if-then statements, returning specified `then` values for each pair and the `else` value if no condition is met.

### Arguments

| Argument       | Description                           |
| -------------- | ------------------------------------- |
| `condition(s)` | Boolean expression to test            |
| `then(s)`      | What to return if `true`              |
| `else`         | What to return if no condition is met |

### Output

Outputs specified `then` value for each `condition` that is true and `else` if all `conditions` are false.

### Example

{% embed url="<https://datawrapper.dwcdn.net/Vky5g/1>" %}
