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:

  • 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.

(
IF([condition],[if_true],[if_false])
)

For instance, if you want to show whether any sales has been made, you could use the following formula:

(
IF(Count(Sales)>0,1,0)
)

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:

(
IF(Count(Sales)>0,IF(Sum(Sales)>0,1,0),0)
)

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.

Did this answer your question?