# Variables

A variable is a field in your data, such as a supporter's region, date of birth, or the amount of each donation. Each variable belongs to a [table](<https://help.apteco.com/en/orbit/data/tables/index.md>), and you find it on the **Variables** tab of the [data picker](<https://help.apteco.com/en/orbit/data/index.md>), in the folders set up for your system.

## Types of variables

Every variable has a type, which decides what it holds and what you can do with it. The data picker shows the type as an icon next to each variable's name.

| Type | Icon | What it holds | Example |
| --- | --- | --- | --- |
| [Selector](<https://help.apteco.com/en/orbit/data/variables/selector/index.md>) | A tick | One category for each record, from a fixed list | Region, Occupation |
| [Multi-response](<https://help.apteco.com/en/orbit/data/variables/selector/#filter-by-a-multi-response-variable>) (array) | Two ticks | Any number of categories for each record | Contact permissions, Newspapers read |
| [Text](<https://help.apteco.com/en/orbit/data/variables/text/index.md>) | ABC | Free text | Surname, Postcode, Email Address |
| [Numeric](<https://help.apteco.com/en/orbit/data/variables/numeric/index.md>) | 123 | Numbers | Age, Holiday Length |
| [Currency](<https://help.apteco.com/en/orbit/data/variables/numeric/index.md>) | A currency symbol, such as £ | Amounts of money | Donation Amount, Cost |
| [Date](<https://help.apteco.com/en/orbit/data/variables/dates/index.md>) | A calendar | Dates | Date of First Donation |
| [DateTime](<https://help.apteco.com/en/orbit/data/variables/dates/index.md>) | A calendar with a clock | Dates with a time of day | Time of a website visit |
| [Reference](<https://help.apteco.com/en/orbit/data/variables/reference/index.md>) | A barcode | A unique reference for each record | Household URN, Supporter ID |

## Filter by a variable

When you choose a variable for a filter, in an audience or on a dashboard, you then choose which of its values to include or exclude. The options depend on the variable's type:

- [Selector and multi-response variables](<https://help.apteco.com/en/orbit/data/variables/selector/index.md>): Tick the categories you want
- [Text variables](<https://help.apteco.com/en/orbit/data/variables/text/index.md>): Enter values to match exactly, or by how they start, end, or what they contain, including wildcards
- [Numeric and currency variables](<https://help.apteco.com/en/orbit/data/variables/numeric/index.md>): Set ranges of values, such as more than £100
- [Date and DateTime variables](<https://help.apteco.com/en/orbit/data/variables/dates/index.md>): Set a date range, which can move with today's date
- [Reference variables](<https://help.apteco.com/en/orbit/data/variables/reference/index.md>): Enter the references of specific records

For most types, the steps follow the same pattern:

1. Choose how to match from the dropdown, such as **Is any of** or **Is none of**.
2. Choose the values. Where the type supports files, you can use any of these tabs:

   - **Values**: Tick the values in a list, or type or paste them, depending on the type
   - **Existing File**: Use a file of values that's already saved in your FastStats system
   - **Upload File**: Upload a file of values from your computer
3. Select **Apply**.

> [!TIP]
>
> Select the **expand** icon in the top-right corner to view the values full-screen.

## Use a file of values

A file of values saves you choosing or typing many values by hand. For example, you could upload a list of postcode sectors for an ad hoc sales territory, or a list of email addresses. You can use a file for selector, multi-response, text, and reference variables.

To upload a file of values:

1. Select the **Upload File** tab.
2. Select **Select File**, and choose the file on your computer.
3. If the preview is as you expect, select **Next**.
4. Choose where to save the file in your FastStats system, and optionally change its name.
5. Select **Upload**, then **Apply**.

The file must have:

- No header row
- A single column of values
- No quotes around the values

Each type has its own rules too, such as which file types it accepts. See the rules for [selector](<https://help.apteco.com/en/orbit/data/variables/selector/#use-a-file-of-categories>), [text](<https://help.apteco.com/en/orbit/data/variables/text/#use-a-file-of-text-values>), and [reference](<https://help.apteco.com/en/orbit/data/variables/reference/#use-a-file-of-references>) variables.

To use a file that's already saved in your FastStats system, select the **Existing File** tab, search for or browse to the file, select it, and select **Apply**. It's also available on the [**Files** tab](<https://help.apteco.com/en/orbit/data/audiences-and-files/#files>) of the data picker.

## Codes and descriptions

The categories of selector and multi-response variables each have a code and a description, such as the code `NW` for the description North West. You'll see them in a few places:

- In the list of categories when you filter, where **View** lets you show codes, descriptions, or both
- In [message personalisation](<https://help.apteco.com/en/orbit/campaigns/journey-builder/personalisation/#variable>), where you choose whether a message shows the description or the code
- In the data picker, where **Include codes in search** matches categories by their codes or descriptions

## Variables on dashboard tiles

How a variable works on a tile also depends on its type:

- **As a [dimension](<https://help.apteco.com/en/orbit/dashboards/dimensions/index.md>)**: Selector and text variables split a tile's data by their categories. Date and numeric variables split it into bands, such as years or ranges of values.
- **As a [measure](<https://help.apteco.com/en/orbit/dashboards/measures/index.md>)**: Numeric and currency variables give a summary of their values, such as the total or average donation, using a function such as **Sum** or **Mean**.

## Custom variables

As well as the variables built into your system, you can create your own in Orbit, from your existing data or from a file you upload. A [custom variable](<https://help.apteco.com/en/orbit/resources/custom-variables/index.md>) then behaves like any other variable, and you find it in the data picker in the same way.

> [!NOTE]
>
> **Example**
>
> Ahead of a year-end appeal, a charity combines its major donors, regular givers, and lapsed donors into one selector variable, "Supporter value". As the dimension of a dashboard tile, it shows how the supporter base breaks down. See the [combine audiences example](<https://help.apteco.com/en/orbit/resources/custom-variables/combine-audiences/#use-a-combine-audiences-variable>).

## Organise and describe your variables

Variables are easier to find and use when they're well organised and clearly described:

- **Folders**: In an Orbit Connect system, you can choose which folders your variables appear in. See [Folder structure](<https://help.apteco.com/en/orbit/connect/system-builds/folder-structure/index.md>).
- **Descriptions**: Variable names don't always say what a variable holds, such as `CuMarita` for marital status. Add a description in the [data dictionary](<https://help.apteco.com/en/orbit/resources/data-dictionary/index.md>), for your team and for the Orin AI assistant.
