---
url: /process-functions/dimension-createorwipe.md
description: >-
  Creates a dimension if it doesn't exist, or removes all of its elements if it
  does.
---

# dimension.createOrWipe

Creates a dimension if it doesn't exist, or removes all of its elements if it does.

```js
dimension.createOrWipe(dimensionName, type)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `dimensionName` | `string` | The dimension's name. |
| `type` | `string` | The dimension's type: `"standard"`, `"measure"`, `"time"`, `"scenario"` or `"geography"`. |

## Returns

An empty string when it succeeds, or an error message when the type isn't valid.

## Examples

```js
dimension.createOrWipe("Account", "standard");
```
