RELATIVE
The RELATIVE identifier changes the absolute cell/column reference to a relative reference.
Syntax
Cell reference
Column reference
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
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.
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.
![](https://docs.inforiver.com/~gitbook/image?url=https%3A%2F%2F3062809325-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEbkCXCUXmtUq5tcnUtZE%252Fuploads%252Fj9M2GKSlVxRECQI1QqfJ%252FFormula%2520relative%2520cell.png%3Falt%3Dmedia%26token%3D64048cd0-5257-48cb-986d-c6cef381c02f&width=768&dpr=4&quality=100&sign=e8bbb915&sv=1)
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.
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.
![](https://docs.inforiver.com/~gitbook/image?url=https%3A%2F%2F3062809325-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEbkCXCUXmtUq5tcnUtZE%252Fuploads%252FhE1P4U2jLVJ2iz7UUbf8%252FFormula%2520relative%2520column.png%3Falt%3Dmedia%26token%3D5a45fd73-3142-4ba1-9574-01408422ea59&width=768&dpr=4&quality=100&sign=86ed4b3f&sv=1)
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.
![](https://docs.inforiver.com/~gitbook/image?url=https%3A%2F%2F3062809325-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEbkCXCUXmtUq5tcnUtZE%252Fuploads%252FIZYXtqDCfHlCqXmxbEov%252FFormula%2520relative%2520column%25202.png%3Falt%3Dmedia%26token%3D28853fe8-8704-4e68-a042-e2f66bb9dfd2&width=768&dpr=4&quality=100&sign=ed71ee45&sv=1)
Last updated