# Why don't I see the aggregate option I want when creating a new aggregation field?

**URL:** <https://community.omni.co/t/why-dont-i-see-the-aggregate-option-i-want-when-creating-a-new-aggregation-field/77>\
**Category:** Modeling\
**Created:** [May 29, 2024, 11:43pm UTC](https://community.omni.co/t/why-dont-i-see-the-aggregate-option-i-want-when-creating-a-new-aggregation-field/77 "2024-05-29T23:43:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aklance](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.omni.co/aklance/32/132_2.png) [@aklance](https://community.omni.co/u/aklance)\
**Post date:** [May 29, 2024, 11:43pm UTC](https://community.omni.co/t/why-dont-i-see-the-aggregate-option-i-want-when-creating-a-new-aggregation-field/77/1 "2024-05-29T23:43:36Z")

</div>

Sometimes we don’t aggregate a specific field when we generate the view. This is often because we don’t recognize the type (for example, we think it’s a string or some unknown type rather than a number or a date).

**Example:**  
You have a “raw\_date” field that is generated as a string type instead of a date type.

To generate the correctly formatted field, you can edit a field’s SQL from the workbook that casts the field to the correct formatting:

1. Navigate to the field’s options (hover and select the vertical three-dot menu to the right of the field name)
2. Click on **Modeling** \> **Edit**.
3. Input the SQL in your database’s dialect to cast the field as the type you expect to see.
  - e.g. use `CAST(raw_date AS DATE)` in the custom field SQL to alter the raw\_date field to have date formatting

Alternatively, you can edit the field in the model by…

1. Navigating to the field’s menu options \> select **Go to definition**
2. Add a sql parameter and enter the sql desired to change the formatting.

**Before:**

```auto
raw_date: {}

```

**After:**

```auto
raw_date:
    sql: CAST(raw_date AS DATE)

```

_Use your database SQL dialect documentation to determine the syntax needed for casting to different field types._
