# LOOKUP

LOOKUP( `column`, `integer`)

Returns a reference to a row relative to the current row, determined by the input `integer`. If `integer` is 0, returns the current row.

{% hint style="info" %}
`OFFSET()` and `LOOKUP()` are aliases of one another.
{% endhint %}

### Arguments

| Argument  | Description                                                      |
| --------- | ---------------------------------------------------------------- |
| `column`  | Column to return                                                 |
| `integer` | Number of rows to offset. `integer` can be positive or negative. |

### Output

Values in `column`, offset by the given `integer`

### Example

Let's say we want to find yesterday's price such that we can compare today's price and yesterday's price directly. `LOOKUP({Price}, -1)` allows us to obtain the price from 1 row behind our current row.&#x20;

{% embed url="<https://datawrapper.dwcdn.net/3uu2G/1>" %}


---

# Agent Instructions: 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.cascade.io/cascade/functions-and-expressions/functions/table/lookup.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.
