Offset Column takes the contents of a selected column and repeats it in a new column, offsetting the values by one row up or down.
Offset Column is useful for deriving the upper or lower bounds of a range, where only one of those values has been supplied. In this example, only the lower bound of the range has been provided in the ‘From’ column.
Input data |
|
ID |
From |
1 |
0 |
2 |
50 |
3 |
100 |
4 |
250 |
5 |
1000 |
To produce an upper bound in a ‘To’ column, the ‘From’ column is offset up one row and the blank value at the bottom is populated with the value 100,000. The first value in the ‘From’ column will be clipped off when data is offset into the ‘To’ column.
Output data |
||
ID |
From |
To |
1 |
0 |
50 |
2 |
50 |
100 |
3 |
100 |
250 |
4 |
250 |
1000 |
5 |
1000 |
100000 |
This is achieved with the following script:
offsetColumn:
offset: -1
source: From
target: To
placeholderValue: 100000
offsetColumn:
offset: 1
source: Source column name
target: New column name
placeholderValue:
An offset value of ‘1’ will move the values in the column down by one row, a value of ‘-1’ will move them up by one row.
The column that the new column will be derived from.
The new column containing the offset rows.
Optional. If a value is entered here, it will populate the blank value created at the start or end of the new column.