---
url: /process-functions/dimension-size.md
description: Returns the number of elements in a dimension.
---

# dimension.size

Returns the number of elements in a dimension.

```js
dimension.size(dimensionName)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `dimensionName` | `string` | The dimension's name. |

## Returns

The number of elements, or `0` when the dimension can't be found. Use [dimension.elementCount](/process-functions/dimension-elementcount) if you need to tell a missing dimension from an empty one.

## Examples

```js
const dimensionSize = dimension.size("time");
```
