---
url: /technical/sequential-set-functions.md
description: >-
  Sequence functions are available for each dimension hierarchy which will
  insert the next member of a hierarchy at the end of the set or the prior
  member of the hierarchy at the beginning of the set.
---

# Sequential Set Functions

Sequence functions are available for each dimension hierarchy which will insert the next member of a hierarchy at the end of the set or the prior member of the hierarchy at the beginning of the set.

These functions can be used in junction with Model Variables Instructions to create rolling reports which may show many historic months and many future months based on the current reporting month variable.

![The Set Instructions editor, annotated to show the Insert Variable instruction, the two Insert Next Member instructions, and the resulting three columns](/dimension-set-functions.png)

In the example above the set starts from the [model variable](/technical/using-model-variables) `Time.Current Month`, which resolves to `2022 - Jul`. Two **Insert Next Member from: Month List** instructions then walk forward through the hierarchy, giving `2022 - Jul`, `2022 - Aug` and `2022 - Sep` on the workview columns.

Because the starting point is a variable rather than a fixed element, the whole set rolls forward on its own each time the variable is updated - add more Next Member instructions to widen the window, or Prior Member instructions to reach backwards.
