---
url: /process-functions/hierarchy-createorwipe.md
description: >-
  Creates a hierarchy within a dimension if it doesn't exist or wipes the data
  on the hierarchy if it exists.
---

# hierarchy.createOrWipe

Creates a hierarchy within a dimension if it doesn't exist or wipes the data on the hierarchy if it exists.

```js
hierarchy.createOrWipe(dimension, hierarchy)
```

#### Parameters

* `dimension` - The dimension in which to create a hierarchy.
* `hierarchy` - The identifier of the hierarchy created.

#### Example

```js
hierarchy.createOrWipe("Account", "Profit and Loss");
```
