User Tools

Site Tools


transformations:addcolumn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
transformations:addcolumn [2015/01/30 04:02]
dmitry created
transformations:addcolumn [2015/04/10 23:25]
dmitry
Line 4: Line 4:
  
 Expression is calculated for every row. Other column values in the same row can be referred by column names in square brackets. It's not possible to refer from one row to another row or to another table. Expression is calculated for every row. Other column values in the same row can be referred by column names in square brackets. It's not possible to refer from one row to another row or to another table.
 +
 +EXAMPLE
 +
 +**Source table:** Average income and deductions
 +
 +^  Country  ^  Gross income    Disposable income  ^  Compulsory deductions  ^
 +| United States  |  56067  |  45582  |  18.7%  |
 +| Australia  |  51050  |  42617  |  16.52%  |
 +| Switzerland  |  53716  |  48414  |  9.87%  |
 +| Canada  |  45896  |  37469  |  18.36%  |
 +
 +**Objective:** calculate the $ amount of compulsory deductions for each country
 +
 +**Transformation parameters:**
 +  * New column name: Deductions $
 +  * Expression: [Gross income] - [Disposable income]
 +
 +**Output table:**
 +
 +^  Country  ^  Gross income    Disposable income  ^  Compulsory deductions  ^  Deductions $  ^
 +| United States  |  56067  |  45582  |  18.7%  |  10485  |
 +| Australia  |  51050  |  42617  |  16.52%  |  8433  |
 +| Switzerland  |  53716  |  48414  |  9.87%  |  5302  |
 +| Canada  |  45896  |  37469  |  18.36%  |  8427  |
 + 
  
 See also See also
   * [[transformations:replacecolumn|Calculate and replace column]]   * [[transformations:replacecolumn|Calculate and replace column]]
transformations/addcolumn.txt · Last modified: 2015/04/10 23:25 by dmitry