# Advanced Expressions

Canonical page: https://www.adaptabletools.com/docs/adaptable-ql-expression-advanced

- Expressions in AdapTable have some powerful features for more advanced use cases.  These include:
  - Using `QUERY` to reference other Expressions by keyword
  - The `VAR` function which allows developers to provide values which can be evaluated in other Expressions
  - Complex Logic - using `IF` and `CASE` functions
  - Error handling - using `IFERROR`, `IFNA` and `NA`
  - Referencing row data (rather than Columns) inside Expressions
  - Using `$SCOPE` as a stand-in for the current column in an object's Column Scope

Most Expressions are often fairly straightforward - typically just a couple of operands and an operator.

However, Expressions can include more complex elements to deal with advanced use cases.

This section details some of the more advanced Expression capabilities supported by [AdapTableQL](https://www.adaptabletools.com/docs/adaptable-ql-expression/index.md):

| Function                          | Description                                                                                                    | Guide                                                                                         |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `QUERY`                           | Reference a [Named Query](https://www.adaptabletools.com/docs/handbook-named-queries/index.md)                                   | [QUERY Function](https://www.adaptabletools.com/docs/adaptable-ql-expression-advanced-query-function/index.md)  |
| `VAR`                             | Inject developer-provided values                                                                               | [VAR Function](https://www.adaptabletools.com/docs/adaptable-ql-expression-advanced-var-function/index.md)      |
| `IF` & `CASE`                     | Conditional logic                                                                                              | [Logic Functions](https://www.adaptabletools.com/docs/adaptable-ql-expression-advanced-logic/index.md)          |
| `IFERROR`/`IFNA` | Catch evaluation errors (and produce N/A)                                                                      | [Error Functions](https://www.adaptabletools.com/docs/adaptable-ql-expression-advanced-iferror/index.md)        |
| `FIELD`                           | Read a value from the row that is not a Column                                                                 | [FIELD Function](https://www.adaptabletools.com/docs/adaptable-ql-expression-advanced-row-data/index.md)        |
| `$SCOPE`                          | Stand-in for current column when evaluating [Column Scope](https://www.adaptabletools.com/docs/dev-guide-columns-scope/index.md) | [$SCOPE Function](https://www.adaptabletools.com/docs/adaptable-ql-expression-advanced-scope-function/index.md) |

- Another advanced Expression use case is [Custom Expression Functions](https://www.adaptabletools.com/docs/adaptable-ql-expression-functions-custom/index.md) 
- These allow developers to provide bespoke functions which are then invoked and evaluated by [AdapTableQL](https://www.adaptabletools.com/docs/adaptable-ql-expression/index.md)
