---
url: /set-instructions/variance-using-prior-two-members.md
description: >-
  Creates a variance entry from the last two members in the working set - the
  simple difference, later minus earlier.
---

# Variance Using Prior Two Members

Appends a computed variance entry to the working list, based on the last two elements already in it: the simple difference, later member minus earlier member. Doesn't reference a specific element itself - it operates on whatever two elements happen to be last in the set.

#### Example

```
1. Element: 2023 Actual, 2024 Actual
2. Variance Using Prior Two Members
```

Adds a third column showing `2024 Actual` minus `2023 Actual` - a year-over-year change column, without a separate cube formula to maintain. See [Variance % Using Prior Two Members](/set-instructions/variance-percent-using-prior-two-members) for the percentage version, and the reversed variants for the opposite subtraction order.

![All four Variance instructions computed from the same two elements, 2023 Actual and 2024 Actual](/set-instructions-example-variance.svg)
