Survey Tabulation > Table specification syntax > Special elements > Creating a derived element calculated from other elements > Create a derived element using relative position to reference elements
 
Create a derived element using relative position to reference elements
When referencing other elements in a derived element, the simplest method is to reference the elements by name, as in the previous example. An alternative method of referencing elements by relative position is also available, using the syntax @ n to reference an element n positions before the derived element. This example uses relative position syntax to create the same table as in the previous example:
age{.., Derived '55 or over' derived('@1 + @2')}
This method can be useful if you want to reuse an expression for elements that are in the same relative position but have different names. However, it is available only for referencing elements that come before the derived element in the table. To reference elements that come after the derived element, you must use the element name.
See also
Creating a derived element calculated from other elements