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/03/30 23:07] – craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Calculate new column(s) ===== | + | {{ transformations: |
+ | ====== CALCULATE NEW COLUMN(S) ====== | ||
+ | Category: Transform / Basic\\ | ||
- | This transformation | + | \\ |
+ | =====Description===== | ||
+ | This action | ||
- | Expression | + | The expression |
- | EXAMPLE | + | Instead of an expression, this action can insert a full column of static text or numeric values.\\ |
+ | |||
+ | |||
+ | \\ | ||
+ | =====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. | ||
+ | |||
+ | \\ | ||
+ | =====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