transformations:addcolumn
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
transformations:addcolumn [2015/04/10 14:16] – elenap | transformations:addcolumn [2021/04/08 23:58] – craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Calculate new column(s) ===== | + | {{ transformations: |
+ | ====== CALCULATE NEW COLUMN(S) ====== | ||
+ | Category: Transform / Basic\\ | ||
- | This transformation | + | \\ |
+ | =====Description===== | ||
+ | This action | ||
- | 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 | + | \\ |
+ | =====Use cases===== | ||
+ | *Creating a calculated result from numeric values in two (or more) other columns. | ||
+ | *Concatenating text values from two (or more) other columns. | ||
+ | *Creating a full-column list of the same text or numeric value. | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Action settings===== | ||
+ | ^Setting^Description^ | ||
+ | |New column name|Enter the name of the new column.| | ||
+ | |Expression or Value|Options: | ||
+ | |Position|Choose where the new column(s) will appear in the dataset. | ||
+ | |||
+ | \\ | ||
+ | =====Remarks===== | ||
+ | The expression is calculated for every row. Other column values in the same row can be referred to by column names in square brackets. It's not possible to refer from one row to another row or to another table. | ||
+ | |||
+ | Instead of an expression, this action can insert a full column of static text or numeric values.\\ | ||
+ | |||
+ | \\ | ||
+ | =====Examples===== | ||
+ | |||
+ | **Example: | ||
**Source table:** Average income and deductions | **Source table:** Average income and deductions | ||
- | ^ Country | + | ^Country |
- | | United States | + | | United States |
- | | Australia | + | | Australia |
- | | Switzerland | + | | Switzerland |
- | | Canada | + | | Canada |
- | **Objective:** calculate the $ amount of compulsory deductions for each country | + | **Action parameters:** |
+ | > New column name: Deductions | ||
+ | > Expression: [Gross income] - [Disposable income] | ||
- | **Transformation parameters: | ||
- | * New column name: Deductions $ | ||
- | * Expression: ([Gross income] - [Disposable income]) | ||
**Output table:** | **Output table:** | ||
- | ^ Country | + | ^Country |
- | | United States | + | | United States |
- | | Australia | + | | Australia |
- | | Switzerland | + | | Switzerland |
- | | Canada | + | | Canada |
- | + | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Shortcuts===== | ||
+ | Fast ways to create the action:\\ | ||
+ | *Right-click on a column heading, and select " | ||
+ | *Click the drop-down arrow in a column heading and select " | ||
+ | In either case, a new column with a default column name will appear //after// the selected column. | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | =====See also===== | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
- | See also | ||
- | * [[transformations: |
transformations/addcolumn.txt · Last modified: 2024/02/05 14:20 by craigt