> For the complete documentation index, see [llms.txt](https://docs.inforiver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inforiver.com/premium-table/formula-syntax/identifiers/relative.md).

# RELATIVE

The RELATIVE identifier changes the absolute cell/column reference to a relative reference.

## Syntax

Cell reference

```javascript
Relative(CELL_REF)
```

Column reference

```
[Column1].Relative(-1)
```

## Arguments

CELL\_REF - Reference to a cell

\[Column1] - Reference to a column

The argument in case of column reference should be a negative number.

## Examples

{% hint style="warning" %}
Relative reference will not work correctly if columns are reordered. Column references from the original layout will be used. Also, it is applicable only when inserting visual measures and not columns.
{% endhint %}

## **1. Cell reference**

Consider ship mode cost for each month. To increase the cost of ship mode by the month's total, you can use the 'Relative' function and select the cell as shown in the below image.

<figure><img src="/files/XSkmVt1GXsnWn1Qxds0V" alt=""><figcaption><p>Relative cell reference</p></figcaption></figure>

Total cost in April = 126.46k

Increased cost for Bookcases -> First Class = 1.06k +126.46k =127.53k

Note that even though we have used the reference to April's total in the formula, it applies the corresponding month's total for the calculation. That is, for Bookcases -> First Class -> January, the updated cost is 0.72k +97.67k, 97.67k being January's total.&#x20;

## 2. Column reference

Consider an example where you want to calculate the variance between the current month's sales and the prior month's sales. The prior month's sales can be calculated using 'Relative' as shown below.

<figure><img src="/files/DbnhyziXzoIcKuhup3qI" alt=""><figcaption><p>Relative column reference</p></figcaption></figure>

This column can be used to calculate variance using the formula shown in the image. Note that IFNA has been used to assign 0 in case of calculation errors.

<figure><img src="/files/AYpwVYqNYoOhqpulTc7L" alt=""><figcaption><p>Using calculated column in downstream calculations</p></figcaption></figure>


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.inforiver.com/premium-table/formula-syntax/identifiers/relative.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
