---
url: /set-instructions/advanced-functions.md
description: Reference for Advanced Functions in MODLR.
---

# Advanced Functions

Advanced Functions cover everything that goes beyond basic selection, ordering and number formatting: formula-driven behaviour, header and cell styling, inserting elements from context or computation rather than hardcoding them, variance calculations, and suppression of empty rows or columns. They're grouped into six sub-categories in the sidebar, plus [Sequential Functions](/set-instructions/sequential-functions) and [Time Functions](/set-instructions/time-functions) covering more specific instruction families.

## Formula-Driven

Instructions whose behaviour is computed by a formula rather than fixed at design time - the formula has access to context, so the result can change per element or per user selection.

| Instruction | What it does |
| --- | --- |
| [Insert Using Formula](/set-instructions/insert-using-formula) | Adds an element whose name is the result of a formula, e.g. `ELEMENT("Time")` or `IF(ELEMENT("Scenario") = "Forecast", "Forecast View", "Actual View")`. |
| [Override A Set Element Using Formula](/set-instructions/override-a-set-element-using-formula) | Replaces an already-selected element with the result of a formula. |
| [Apply Style Using Formula](/set-instructions/apply-style-using-formula) | Applies a named cell style per element, computed by formula - the basis for heatmap-style conditional formatting. |
| [Apply New Header Labels Using Formula](/set-instructions/apply-new-header-labels-using-formula) | Replaces an element's displayed header text with a formula result, for when the element name or alias isn't the label you want. |
| [Apply Header Sizing Using Formula](/set-instructions/apply-header-sizing-using-formula) | Sets column width or row height per element via formula. |
| [Apply Number Formatting Using Formula](/set-instructions/apply-number-formatting-using-formula) | Chooses the number format per element via formula, e.g. `IF(ELEMENT("Account") = "Margin %", "0.0%", "#,##0")`. |

`Insert Using Formula` with a plain `ELEMENT("Dimension")` formula is functionally equivalent to `Insert Element From Title` (below) - reach for the formula form specifically when you need conditional logic around the insertion.

## Headers & Styling

| Instruction | What it does |
| --- | --- |
| [Insert Cell Style](/set-instructions/insert-cell-style) | Applies a named, pre-defined style (configured in Manage Model) to data cells. |
| [Insert Heading Style](/set-instructions/insert-heading-style) | Applies a named style to header cells. |
| [Disable Input On Cells](/set-instructions/disable-input-on-cells) | Marks cells as read-only, overriding the default where every leaf-level Workview cell is editable. |
| [Hide Set Headers](/set-instructions/hide-set-headers) | Hides the headers for this set specifically. |
| [Hide Dimension Headers](/set-instructions/hide-dimension-headers) | Hides headers for the whole dimension on this axis, including any other sets stacked alongside it. Typically paired with `Apply New Header Labels Using Formula` to avoid showing both the custom and default headers. |
| [Set The Alias For The Set](/set-instructions/set-the-alias-for-the-set) | Displays this set's elements using a specific alias, overriding the dimension's default. |

## Element Insertion

Instructions that add elements from somewhere other than a manual pick in the hierarchy explorer - useful whenever a set should respond to context instead of a fixed selection.

| Instruction | What it does |
| --- | --- |
| [Insert Element From Title](/set-instructions/insert-element-from-title) | Adds whichever element is currently in context for a named dimension - the standard way to make a Card set context-driven. |
| [Inserts A Variable Value Into The Working Set](/set-instructions/inserts-a-variable-value-into-the-working-set) | Adds the element whose name matches a variable's current value; adds nothing if no matching element exists. |
| [Insert The Next Element From A Hierarchy](/set-instructions/insert-the-next-element-from-a-hierarchy) | Adds the element immediately after the current last element - "the next month," relative to wherever the set currently ends. |
| [Insert The Previous Element From A Hierarchy](/set-instructions/insert-the-previous-element-from-a-hierarchy) | The mirror instruction - adds the element immediately before the current first element. |

See [Common Patterns](/set-instructions/common-patterns) for a worked example of a context-driven Card set.

## Variance

Instructions that compute a variance entry from the last two members already in the working list, rather than referencing a specific element.

| Instruction | What it produces |
| --- | --- |
| [Variance Using Prior Two Members](/set-instructions/variance-using-prior-two-members) | The simple difference (later minus earlier). |
| [Variance Using Prior Two Members (Reversed)](/set-instructions/variance-using-prior-two-members-reversed) | The reversed difference (earlier minus later). |
| [Variance % Using Prior Two Members](/set-instructions/variance-percent-using-prior-two-members) | The percentage variance. |
| [Variance % Using Prior Two Members (Reversed)](/set-instructions/variance-percent-using-prior-two-members-reversed) | The reversed percentage variance. |

Useful for actual-vs-budget or current-vs-prior-period comparisons: add the two elements being compared, then one of these instructions to append a computed variance entry after them.

## Suppression

**Workview-only.** These instructions control *how* a set behaves once suppression is switched on at the Workview level (Zero Suppress Rows / Zero Suppress Columns, in the View menu) - they don't turn suppression on by themselves.

| Instruction | What it does |
| --- | --- |
| [Suppress Zeros](/set-instructions/suppress-zeros) | Removes any row or column where every visible cell is zero or empty. This is also the default behaviour when suppression is enabled and no suppression instruction is present in the set. |
| [Suppress Empty Elements (Except One)](/set-instructions/suppress-empty-elements-except-one) | The same, but always leaves at least one element visible even if every element in the set is empty - avoids a Workview axis rendering as completely blank. |

Both instructions only take effect once the corresponding View-menu toggle is switched on for that axis - they describe *how* to suppress, not *whether* to.
