## Usage

```
view: view_name {
  dimension: field_name { ... }
}
```

|---|---|
| Hierarchy [View File](https://docs.cloud.google.com/looker/docs/reference/param-view.md.txt) [`view`](https://docs.cloud.google.com/looker/docs/reference/param-view-view.md.txt) `dimension` | Accepts A [Looker identifier](https://docs.cloud.google.com/looker/docs/sql-and-referring-to-lookml.md.txt#scoping_and_naming) to name the dimension <br /> |

## Definition

The `dimension` parameter declares a new dimension and specifies a name for that dimension.

The name must meet the following requirements:

- It must be unique within any given view.
- It must consist of characters `a` through `z`, `0` through `9`, or `_`. The dimension name is case-sensitive. Because of this, we recommend using a consistent lowercase name for all LookML objects, including dimensions.
- It must start with a letter.

There are many types of dimensions, as discussed further on the [Dimension, filter, and parameter types](https://docs.cloud.google.com/looker/docs/reference/param-dimension-filter-parameter-types.md.txt) documentation page.

## Subparameters for `dimension`

See the [Field parameters](https://docs.cloud.google.com/looker/docs/reference/param-field.md.txt#example_usage) reference page for a list of subparameters that are available for LookML fields.

> [!TIP]
> **Tip:** You can use the [Quick Help panel](https://docs.cloud.google.com/looker/docs/looker-ide.md.txt#quick_help_panel) in the Looker IDE to quickly see the available subparameters for a given LookML field. Click a LookML parameter in the IDE editor panel to update the **Quick Help** panel to display the supported options and subparameters for that LookML element. Also, you can click a parameter name in the **Quick Help** panel to open the Looker documentation page for that parameter.

## Examples

Create an `id` and a `supplier_name` dimension in a view named `products`:

    view: products {
      dimension: id {
        primary_key: yes
        sql: ${TABLE}.id ;;
      }
      dimension: supplier_name {
        sql: ${TABLE}.supplier_name ;;
      }
    }