transformations:rule
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
transformations:rule [2021/04/01 18:30] – craigt | transformations:rule [2021/07/19 02:30] (current) – [Examples] craigt | ||
---|---|---|---|
Line 5: | Line 5: | ||
\\ | \\ | ||
=====Description===== | =====Description===== | ||
- | This action calculates a new, or replaces an existing, column by using one or several ordered IF...THEN...ELSE conditions. The conditions are checked one by one until a satisfying condition is found. When a satisfying condition is found, the result is calculated and all other conditions are ignored. When no satisfying condition is found, the default calculation is applied. | + | This action calculates a new column |
- | + | ||
- | The order of conditions is significant as conditions are checked starting from the first (top). Therefore, conditions that come first have priority over conditions that come later. | + | |
- | + | ||
- | While the same result can be achieved using an expression with nested [[syntax: | + | |
- | \\ | + | |
\\ | \\ | ||
Line 31: | Line 25: | ||
|Default to|Options: | |Default to|Options: | ||
|Keep original value|If none of the //if// statements evaluate to TRUE, retain the original value.| | |Keep original value|If none of the //if// statements evaluate to TRUE, retain the original value.| | ||
+ | |||
+ | \\ | ||
+ | =====Remarks===== | ||
+ | The order of conditions is significant as conditions are checked starting with the first (top). Therefore, conditions that come first have priority over conditions that come later. | ||
+ | |||
+ | While the same result can be achieved using an expression with nested [[syntax: | ||
\\ | \\ | ||
=====Examples===== | =====Examples===== | ||
- | **Objective:** Add a column describing the average spending potential in each country as low or high, based on the disposable income. | + | **Example:** Add a column describing the average spending potential in each country as low or high, based on the disposable income. |
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. | ||
Line 45: | Line 45: | ||
| Switzerland | | Switzerland | ||
| Canada | | Canada | ||
+ | \\ | ||
**Action parameters: | **Action parameters: | ||
>Create new column: Spending | >Create new column: Spending | ||
> | > | ||
- | >If none of the condition | + | >If none of the conditions |
- | + | \\ | |
- | **Output | + | **Result |
^Country | ^Country | ||
| United States | | United States | ||
Line 58: | Line 57: | ||
| Switzerland | | Switzerland | ||
| Canada | | Canada | ||
+ | |||
+ | \\ | ||
+ | ====Community examples==== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
\\ | \\ | ||
Line 68: | Line 75: | ||
=====See also===== | =====See also===== | ||
* [[transformations: | * [[transformations: | ||
- | * [[transformations: | + | * [[transformations: |
* [[https:// | * [[https:// |
transformations/rule.txt · Last modified: 2021/07/19 02:30 by craigt