-
Posts
44 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Blogs
Events
Terms & Conditions
Downloads
Videos
Store
Posts posted by Alessandra Casale
-
-
Hello Jack!
The solution should be the following formula:
ifelse(abs($"Col_1"-$"Actual") < abs($"Col_2"-$"Actual"), "Col_1", "Col_2")
- 1
Multi-column formula
in Rulex Platform
Posted
Hi!
You can use the copy formula / paste formula command. There are 2 cases:
If the formula involves one variable only (e.g. $”X”=$”X”+1)
If the formula involves two (or more) variables (e.g. $”Z1”=$”X1”+$”Y1”) the situation is a little more complex.
Let suppose you have the following dataset
and you want to evaluate Z_i as follows:
Z_i = X_i + Y_i
where i =1,2,3.
This allows you to achieve your goal.
Please note, the column order is crucial: when you copy the formula ”Z1” = $”X1” + $Y1” you are implicitly assuming that you are copying a relation between columns (i.e. column7 = column1 + column4). When you paste the formula to Z2 (i.e. the column 8), Rulex Platform automatically shifts the formula by one column, resulting in column8= column2 + column5.
Finally, I would like to highlight one more feature of copy / paste formula.
Let us suppose you want to quickly define the following set of equations:
Z1 = X1 + Y1
Z2 = X1 + Y2
Z3 = X1 + Y3
using the copy/paste command.
Here the issue is that X1 remains the same across equations.
To achieve your aim, you define the first equation as
$”Z1” = $$”X1” + $”Y1”
and then just copy and paste this formula. The double $$ ensures that the variable X1 remains the same while the others vary according to the rules listed above.