User Tools

Site Tools


transformations:replacecolumn

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
transformations:replacecolumn [2015/04/10 14:27] elenaptransformations:replacecolumn [2021/04/01 14:57] craigt
Line 1: Line 1:
-===== Calculate and replace column(s) =====+{{ transformations:ReplaceColumnsAction.png}} 
 +====== MODIFY COLUMN(S) =====
 +Category: Transform / Basic\\
  
-This transformation calculates and replaces one or more existing columns using [[syntax:start|expression(s)]]. One expression replaces one column.+\\  
 +=====Description===== 
 +This action calculates and replaces one or more existing columns using [[syntax:start|expression(s)]]. One expression replaces one column.
  
-Please note that you can refer to the same column in expressions. In this case previous (old) value from this column will be used.+Please note that you can refer to the same column in expressions. In this case, the original value from this column will be used.\\
  
-EXAMPLE 
  
-**Source table:** Average income and deductions+\\  
 +=====Action settings===== 
 +^Setting^Description^ 
 +|Column to replace|Select the name of the column to replace.| 
 +|Expression or Value|Options //It's an expression// or //It's a text or number// Enter the expression used to calculate the updated\\ column values, or, enter the text or numeric value that will be repeated for all values.| 
 +Click //Replace more columns// to modify additional columns within this same action.\\
  
-^  Country  ^  Gross income    Disposable income  ^  Compulsory deductions  ^ +\\  
-| United States  |  56067  |  45582  |  18.7%  | +=====Examples=====
-| 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 and include the result in the table instead of the deductions in %. **Objective:** Calculate the $ amount of compulsory deductions for each country and include the result in the table instead of the deductions in %.
  
-**Transformation parameters:** +**Source table:** Average income and deductions 
-  * Column to replace: Compulsory deductions + 
-  Expression: ([Gross income] - [Disposable income])+^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%| 
 + 
 +**Action parameters:** 
 +>Column to replace: Compulsory deductions 
 +>Expression: ([Gross income] - [Disposable income]) 
  
 **Output table:** **Output table:**
  
- Country  Gross income    Disposable income  Compulsory deductions +^Country  ^Gross income   ^Disposable income  ^Compulsory deductions 
-| United States  |  56067  |  45582  |  10485  +| United States  |  56067|  45582|  10485| 
-| Australia  |  51050  |  42617  |   8433  +| Australia  |  51050|  42617|   8433| 
-| Switzerland  |  53716  |  48414  |  5302  +| Switzerland  |  53716|  48414|  5302| 
-| Canada  |  45896  |  37469  |   8427  | +| Canada  |  45896|  37469|   8427|
- +
  
-See also+ 
 +\\  
 +=====Shortcuts===== 
 +Fast ways to create the action:\\ 
 +  *Right-click on a column heading, and select "Modify", then "With expression..." from the submenu. 
 +  *Click the drop-down arrow in a column heading and select "Modify", then "With expression..." from the submenu. 
 + 
 + 
 +\\  
 +=====See also=====
   * [[transformations:addcolumn|Calculate new column(s)]]   * [[transformations:addcolumn|Calculate new column(s)]]
 +

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki