In some situations you might want to use different calculations for a formula depending on the result of another calculation. This is where you can use "IF statements".
Example use cases of IF statements:
- Check if multiple budgets have all been reached
- Yes/no results of target vs actual
While it can appear pretty difficult to make IF statements, it's something that anyone can do with a little training. In Plecto, IF statements work the same way as Excel.
For instance, if you want to show whether any sales has been made, you could use the following formula:
In this case, if any sales have been made the formula will return 1 and otherwise 0.
Nested IF statements
You can include additional IF statements inside an IF statements if_false/if_true fields. Example:
In this case we check whether the number of sales is larger than 0 and also if the sum of sales is larger than 0. If both things are true the formula will return 1 otherwise it will return 0.