---
url: /process-functions/hierarchy-position.md
description: Returns the position of an element in a hierarchy.
---

# hierarchy.position

Returns the position of an element in a hierarchy.

```js
hierarchy.position(dimension, hierarchy, element)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `dimension` | `string` | The dimension's name or id. |
| `hierarchy` | `string` | The hierarchy's name or id. |
| `element` | `string` | The element's name. |

## Returns

The element's position, starting at `0`, or `-1` when it can't be found.

## Examples

```js
const position = hierarchy.position("Account", "Management Profit and Loss", "EBIT");
```
