> ## Documentation Index
> Fetch the complete documentation index at: https://oculon.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Variable

Variable act as storing the “Qualitative Nature” of a measure. Variables are the heart of your models. You can consider them as unit for holding data or formulas or store values or calculations.

**Creating a variable**

You can create or define a single variable or add categories of variable under a variable.

*Example of a single variable name “Revenue”:*

![](https://mintcdn.com/oculon/2ze9UxHD5qWqzavK/images/getting-started/variable.png?fit=max\&auto=format\&n=2ze9UxHD5qWqzavK\&q=85\&s=8ad644e16c35dec6e0d2fcf08b039626)

**Use clear names:**

Keep your variables well-named so they’re easy to recognize. For instance, instead of "X1", go for "TotalSales" or "CostPerUnit".

**Leverage autocompletes:**

When referencing variables in formulas, start typing their name, and pick the right one from the dropdown—it’s a time-saver!

## **Formatting a variable**

Formatting variables helps make your models clearer and easier to understand. You can apply various types of formatting depending on the kind of data your variable holds.

![](https://mintcdn.com/oculon/2ze9UxHD5qWqzavK/images/getting-started/format-variables.png?fit=max\&auto=format\&n=2ze9UxHD5qWqzavK\&q=85\&s=31461c62ccfdf39be17015ac9a3d8117)

**Variable Types**

Variables can be formatted based on the kind of data they represent. Choosing the right type ensures your data is displayed correctly and makes your model easier to understand.

* **Number** → General numeric values
* **Currency** → Financial values like revenue or cost
* **Percentage (%)** → Ratios such as margins or growth
* **Date** → Time-based values
* **Boolean** → True/false logic

**Format Options**

You can customize how values are displayed to match your use case and improve readability.

* **Prefix / Suffix** → Add symbols or units (e.g., \$, %, users)
* **Integer** → Remove decimals for whole numbers
* **Comma Separators** → Improve readability (1,000,000)
* **Zero Handling** → Show zero as a dash (-) or value
* **Negatives** → Control how negative values appear
* **Precision** → Define decimal type and number of places
* **Magnitude** → Scale values (K, M, etc.)
* **Relative Time** → Adjust how time-based values are shown

**Aggregation**

Aggregation controls how values are rolled up across your data, helping you analyze trends at a higher level.

* **By Dimension** → Combine values across categories (e.g., regions, products)
* **By Time** → Roll up values across periods (e.g., monthly → yearly)

**Sorting**

Sorting helps you quickly make sense of your data by organizing it in a meaningful way.

* **Ascending** → Lowest to highest
* **Descending** → Highest to lowest

**Best Practices**

* Use **currency** for financial metrics
* Use **%** for ratios and growth
* Keep **precision consistent** across variables
* Use aggregation and sorting to highlight insights

## **Linking Variable:**

What is Linking Variables?

Linking Variables allows you to reuse variables from one model in another, eliminating the need to recreate them from scratch. This saves time and ensures consistency across multiple models.

![](https://mintcdn.com/oculon/2ze9UxHD5qWqzavK/images/getting-started/variables-linked.png?fit=max\&auto=format\&n=2ze9UxHD5qWqzavK\&q=85\&s=692dae251582ec1565e99ab8fbc651aa)

**Browse Available Variables**

* A list of available variables from other models will appear.
* Search or filter to find the variable you need.

**Select and Link**

* Choose the variable you want to link, and it will automatically be added to your model.

## **Attaching Dimesnions in a Variable:**

Dimensions let you break down variables into more granular categories, such as regions, products, or departments. By attaching dimensions to a variable, you can analyze and model data at a detailed level.

**How to Attach Dimensions to a Variable**

![](https://mintcdn.com/oculon/2ze9UxHD5qWqzavK/images/getting-started/adding-dimension.png?fit=max\&auto=format\&n=2ze9UxHD5qWqzavK\&q=85\&s=5f90ac587e0c1003617d42fdd573f6c1)

1. Hover on Variable Cell
2. Select "Add Dimension" Icon
3. Choose or Create a Dimension
   * Select from existing dimensions like **Region**, **Product**, or **Department**.
   * Or create a new dimension by defining categories (e.g., North, South, East for Region).
4. Apply the Dimension

## **Sections and Variables:**

Sections help you group and organize variables in your spreadsheet view for easy navigation and better structure.

## **Moving Variable:**

**Moving Variables within the same model**

To move a variable inside your current model, just grab the variable and drag it to a different section.

![](https://mintcdn.com/oculon/2ze9UxHD5qWqzavK/images/getting-started/drag-drop.png?fit=max\&auto=format\&n=2ze9UxHD5qWqzavK\&q=85\&s=178d18b1316fc33e621f8e36eccedb13)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.