This action calculates new or replaces 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.
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 after them.
While the same result can be achieved using an expression with nested if functions, the use of Rule action is recommended for clarity, readability, and the ease of rearranging the order.
Source table: Average income and deductions
|Country||Gross income||Disposable income||Compulsory deductions|
Objective: 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.
|Country||Gross income||Disposable income||Compulsory deductions||Spending|