---
url: /set-instructions/override-a-set-element-using-formula.md
description: Override any dimension's selected element based on a formula
---

# Override A Set Element Using Formula

Replaces an already-selected element in the working list with the result of a formula, rather than adding a new element the way [Insert Using Formula](/set-instructions/insert-using-formula) does. Useful when a set needs to start from a fixed, manually-picked element but redirect to a computed one under certain conditions.

::: warning Must evaluate to a fully-qualified element reference
The formula has to return a `Dimension:Element` reference - `"Account:Net Profit"`, for example - not a bare element name. See [Understanding a Cell Address](/technical/understanding-a-cell-address) for the addressing syntax this follows.
:::

| Argument | Type | Description |
| --- | --- | ------ |
| Formula | Formula | The formula to evaluate for each element in the working set |

#### Example

```
1. Element: Default Region
2. Override A Set Element Using Formula
```

```
IF(VARIABLE("region-override") ~ "", "Region:" & VARIABLE("region-override"), "Region:" & ELEMENT("Region"))
```

The set starts pointed at `Default Region`, but the override formula swaps it for whatever `region-override` holds whenever that variable has been set, falling back to the current Region context otherwise - both branches return a fully-qualified `Region:` reference, not a bare element name.
