transformations:replacecolumns
Table of Contents
MODIFY COLUMN(S)
Category: Transform / Basic
Description
This action calculates and replaces one or more existing columns using expression(s). One expression replaces one column.
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.
Remarks
You can refer to the same column in expressions. In this case, the original value from this column will be used.
Examples
Example: Calculate the $ amount of compulsory deductions for each country and include the result in the table instead of the deductions in %.
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% |
Action parameters:
Column to replace: Compulsory deductions
Expression: ([Gross income] - [Disposable income])
Result table:
Country | Gross income | Disposable income | Compulsory deductions |
---|---|---|---|
United States | 56067 | 45582 | 10485 |
Australia | 51050 | 42617 | 8433 |
Switzerland | 53716 | 48414 | 5302 |
Canada | 45896 | 37469 | 8427 |
Community examples
- Optional calculations with columns (Project; Module: Main; Group: Tab 1; Table: Optional calculation; Action position: 3)
- How to obtain a list of all files recursively (Project; Module: Main; Group: Tab 1; Table: Table 1; Action position: 3)
- Match action - matching multiple values (Project; Module: Get matches; Group: Tab 1; Table: Lookup table; Action position: 4)
- Transforming Single Row of Data from CSV into Multiple Rows (Project; Module: Main; Group: Tab 1; Table: Table 1; Action position: 3)
- Reverse Fill-down (Project; Module: Main; Group: Group 1; Table: Table 2 (2); Action position: 3)
- Parsing Exceptionally Complex Column (Project; Module: Main; Group: Group 1; Table: Table 1 (parsed); Action position: 3)
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/replacecolumns.txt · Last modified: 2021/07/19 01:19 by craigt