> For the complete documentation index, see [llms.txt](https://docs.valq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valq.com/model/formula-functions/range-functions.md).

# Range Functions

<table><thead><tr><th width="230">NAME</th><th width="288">SYNTAX</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><a href="/pages/0BffhsyRGH2KtMm1lgGt">Range</a></td><td>.Range(start_index,end_index)- > number</td><td>Returns the values between the specified start and end periods.</td></tr><tr><td><a href="/pages/fYjm6RnLGJdnebG63D3K">LastNPeriods</a></td><td>.LastNPeriods(n)- > number</td><td>Returns the values of the last 'n' periods</td></tr><tr><td><a href="/pages/N15bi45yzEodn0cz9a3V">Get</a></td><td>.Get(period_index)- > number</td><td>Returns the values of the specified period index</td></tr><tr><td><a href="/pages/ZJ4bncRZbjpntxCcVouL">ForEach</a></td><td>ForEach(Array,Iterator)</td><td>To apply the same operation for multiple nodes.</td></tr><tr><td><a href="/pages/x6izkBa09Sp6ZzTN8SHV">findByTitle</a></td><td>findByTitle(searchString) - > [?]</td><td>Tagging/Grouping function. Returns the value of the nodes which has the specified title</td></tr><tr><td><a href="/pages/nH0Z5x51ADgOvEe6eHRA">GETCURRENTRANGE</a></td><td>DS.(SERIES).GETCURRENTRANGE()</td><td>Returns the current range values based on the period selection.</td></tr><tr><td><a href="/pages/LMjbfSwylJHgoQHLJeNO">GETROWVALUE</a></td><td>DS.(SERIES).GETROWVALUE(sourceKey: string) - > [number]</td><td>Value of source key row</td></tr><tr><td><a href="/pages/q8a8cl4VHYNorniv2QBc">THIS_SOURCE_KEY</a></td><td>DS.(SERIES).THIS_SOURCE_KEY</td><td>Returns the value of the mentioned source key.</td></tr><tr><td><a href="/pages/0Hw8ScTuDKEutHralqd5">PRIOR_SERIES_PERIOD_LOOKUP </a></td><td><p>PRIOR_SERIES_PERIOD_LOOKUP</p><p>(seriesOffset, periodIndex, initialValue) - > [number]</p></td><td>Returns the specified period's value.</td></tr><tr><td><a href="/pages/n7rDGNsd133ENEvyvQf0">PERIOD_LOOKUP</a></td><td>PERIOD_LOOKUP(offset, initialValue) - > [number]</td><td>Returns the specified series's value.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valq.com/model/formula-functions/range-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
