---
url: /set-instructions/data-formatting.md
description: Reference for Data Formatting in MODLR.
---

# Data Formatting

Data Formatting instructions set the number format applied to data cells associated with the working list. They're Workview-specific - Cards and Excel handle number formatting at the component/cell level instead, so these instructions are simply skipped outside a Workview.

| Instruction | Format pattern | Example output |
| --- | --- | --- |
| [Format 0,000](/set-instructions/format-0-000) | Whole number, thousand separators | `1,234,568` |
| [Format 0,000.0](/set-instructions/format-0-000-0) | One decimal place | `1,234,567.9` |
| [Format 0,000.00](/set-instructions/format-0-000-00) | Two decimal places | `1,234,567.89` |
| [Format 0,000.000](/set-instructions/format-0-000-000) | Three decimal places | `1,234,567.890` |
| [Format 0,000.0000](/set-instructions/format-0-000-0000) | Four decimal places | `1,234,567.8900` |
| [Format 0,000.00000](/set-instructions/format-0-000-00000) | Five decimal places | `1,234,567.89000` |
| [Format 0%](/set-instructions/format-0-percent) | Percentage, no decimals | `12%` |
| [Format 0.0%](/set-instructions/format-0-0-percent) | Percentage, one decimal | `12.3%` |
| [Format 0.00%](/set-instructions/format-0-00-percent) | Percentage, two decimals | `12.30%` |
| [Format 0.000%](/set-instructions/format-0-000-percent) | Percentage, three decimals | `12.300%` |
| [Format Items Using The Next Instruction](/set-instructions/format-items-using-the-next-instruction) | Applies formatting to only the element(s) the next instruction specifies, rather than the whole working list. |
| [Ignore New Formatting On Prior Members](/set-instructions/ignore-new-formatting-on-prior-members) | A boundary marker - formatting instructions added after this point stop applying to elements added before it. |

For formula-driven formatting - where the format itself depends on the element or context - see [Apply Number Formatting Using Formula](/set-instructions/apply-number-formatting-using-formula) under [Advanced Functions](/set-instructions/advanced-functions). These ten instructions are named shortcuts for the ten most common patterns in MODLR's underlying format syntax - see [MODLR Number Formats](/technical/modlr-formats) for the full pattern reference (including `k`/`m`/`b` abbreviations with no dedicated Set Instruction) and how to reproduce the same formatting in a Card.

![The same raw value formatted six different ways](/set-instructions-example-number-formats.svg)

![The same raw value formatted four different ways](/set-instructions-example-percent-formats.svg)

## A format instruction applies to everything above it, until told otherwise

A `Format` instruction doesn't just format the element you just added - it applies to the entire working list built so far. In a set with mixed measures (some percentages, some currency), the last format instruction silently overrides any earlier one unless you mark a boundary with `Ignore New Formatting On Prior Members`:

```
1. Element: Units
2. Format 0,000
3. Ignore New Formatting On Prior Members
4. Element: Margin %
5. Format 0.00%
```

Without step 3, the `0.00%` format from step 5 would apply retroactively to `Units` as well, overriding the `0,000` format set in step 2.

![Without the boundary, the later percentage format overrides the earlier one retroactively; with it, each group keeps its own format](/set-instructions-example-ignore-formatting.svg)
