To build a formula, you must connect any combination of variables and operators to create a logical expression. Once the logic is defined, Logica will evaluate the formula for all time periods.
A simple example is “1 + 2 = 3”. In Logica, this can be represented by two input variables, one with a value of 1 and the other with a value of 2. These two variables should be linked to an addition operator and that addition operator is linked to a calculated variable. That calculated variable will then have a value of 3--the result of the addition of 1 + 2.
To connect a variable to an operator, click on one of the link connection points on the variable or operator and drag to the desired link connection point on the corresponding variable or operator.
Connecting a variable to the top link node of an operator:
Connecting an operator to a calculated variable:
The completed formula, with the variable “Result” displayed in white to indicate it is a calculated variable:
The entire simple formula being created by dragging and dropping variables and operators, and linking them together:
The result of this formula can be seen in the table below as well; The values of each input variable is shown (Variable 1 and Variable 2), as well as the result of the addition of those two variables (Result).
What's next?
Now that you've worked with the arithmetic operators, you're ready to learn about comparison and conditional formulas! These allow you to create more complex models in Logica.
Read about scenarios to compare different sets of data modeled on the same underlying formulas.