---
url: /set-instructions/insert-the-previous-element-from-a-hierarchy.md
description: >-
  Adds the element immediately before the current first element in a hierarchy -
  the mirror of Insert The Next Element From A Hierarchy.
---

# Insert The Previous Element From A Hierarchy

The mirror of [Insert The Next Element From A Hierarchy](/set-instructions/insert-the-next-element-from-a-hierarchy) - adds the element that comes immediately before the current first element in the working list, based on its position in the hierarchy.

#### Example

```
1. Element: 2026 - Jan
2. Insert The Previous Element From A Hierarchy
```

Produces `2025 - Dec`, `2026 - Jan` - the instruction correctly crosses the year boundary rather than just decrementing a month number, since it's following the hierarchy's actual element order. Chaining the instruction again would add `2025 - Nov` ahead of that, and so on - a trailing window ending at the current month, without hardcoding which months those are.

![Element: 2026 - Jan, then Insert The Previous Element From A Hierarchy adds 2025 - Dec ahead of it](/set-instructions-example-insert-previous-element.svg)
