transformations:rule
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:rule [2015/04/10 14:47] – elenap | transformations:rule [2021/04/01 18:30] – craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Rule ===== | + | {{ transformations: |
+ | ====== | ||
+ | Category: Transform / Basic\\ | ||
- | This transformation | + | \\ |
+ | =====Description===== | ||
+ | This action | ||
- | Rule transformation | + | The order of conditions |
- | EXAMPLE | + | While the same result can be achieved using an expression with nested [[syntax: |
+ | \\ | ||
- | **Source table:** Average income and deductions | ||
- | ^ | + | \\ |
- | | United States | + | =====Action settings===== |
- | | Australia | + | ====Column options==== |
- | | Switzerland | + | ^Setting^Description^ |
- | | Canada | + | |Create new column|This option creates a new column with the results of the rule. Enter a name for the new column in the text box at the right.| |
+ | |Replace existing|With this option, select the column that will contain the results of the rule, overwriting the existing values.| | ||
+ | \\ | ||
+ | ====Calculated as settings==== | ||
+ | ^Setting^Description^ | ||
+ | |if|An expression that evaluates to either //TRUE// or //FALSE// which determines whether the //then// statement will be processed (i.e., the //then// will run when the //if// expression is TRUE.| | ||
+ | |then|The value inserted into the column when the //if// condition is TRUE. This can be entered as an expression or static value. | ||
+ | You can add more if/then conditions using the //Add more rules// option. | ||
+ | \\ | ||
+ | ====No conditions met options==== | ||
+ | ^Setting^Description^ | ||
+ | |Make empty|If none of the //if// statements evaluate to TRUE, enter an " | ||
+ | |Default to|Options: | ||
+ | |Keep original value|If none of the //if// statements evaluate to TRUE, retain the original value.| | ||
+ | |||
+ | \\ | ||
+ | =====Examples===== | ||
**Objective: | **Objective: | ||
The spending potential is high if the disposable income is $40,000 or more. | The spending potential is high if the disposable income is $40,000 or more. | ||
- | **Transformation parameters:** | + | **Source table:** Average income and deductions |
- | * Create new column: Spending | + | |
- | | + | ^ Country |
- | | + | | United States |
+ | | Australia | ||
+ | | Switzerland | ||
+ | | Canada | ||
+ | |||
+ | **Action parameters: | ||
+ | >Create new column: Spending | ||
+ | >Calculated as: if ([Disposable income] > 40000), then HIGH. | ||
+ | >If none of the condition above is met: Default to LOW | ||
**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 " | ||
+ | |||
+ | \\ | ||
+ | =====See also===== | ||
+ | * [[transformations: | ||
+ | * [[transformations: | ||
+ | * [[https:// |
transformations/rule.txt · Last modified: 2021/07/19 02:30 by craigt