# Custom Dimension

## Overview

A **Custom Dimension** in ReOrc allows users to define new categorical fields within a Cube that do not exist directly in the underlying data model. Custom Dimensions enhance analytical capabilities by enabling additional grouping, filtering, and segmentation of data.

## What is Custom Dimension?

A **Custom Dimension** is a user-defined field that categorizes data based on computed logic, transformations, or predefined criteria. These dimensions help refine analyses without modifying the raw dataset.

## Use Cases

Custom Dimensions are used when:

* **Derived Categorization**: Creating new classifications, such as grouping age into "Youth," "Adult," and "Senior."
* **Conditional Labels**: Assigning custom labels based on business rules, such as "High Value Customer" for those with purchases over a threshold.
* **Combining Attributes**: Merging multiple fields into a single dimension, like concatenating `Region` and `Sales Territory`.
* **Data Standardization**: Normalizing values across different datasets to ensure consistency.

## Create a Custom Dimension

To create a custom dimension, follow these steps:

{% hint style="info" %}
Ensure the cube's primary key has been set before proceed to create the custom dimension. Refer [Cube](/semantic-modeling/cube.md#create-cube)
{% endhint %}

1. Click on **+** button, select **Add a dimension**

<figure><img src="/files/Huq7kMyhc60KrLI7DtjB" alt=""><figcaption></figcaption></figure>

2. Fill in the details in the modal:
   1. **Field label** will be auto populate based on the Field name&#x20;
   2. When entering the **custom formula**, you can click on the fields on the list to auto populate into the formula box.

<figure><img src="/files/HZHeDJE47O2psUqZ7BPz" alt=""><figcaption></figcaption></figure>

3. Click on **Validate** button to validate the formula

{% hint style="warning" %}
Ensure that the custom formula matches the type of database connected.
{% endhint %}

4. Once no error detected, click on **Add** button to add the custom dimension into the cube.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.reorc.com/semantic-modeling/cube/custom-dimension.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
