Formula operators apply if/then/else conditions in Invoca formulas, returning true, false, or a predetermined value.
Formula operators let you apply if/then/else conditions in your formulas. Use operators in your formulas so they return true, false, or a predetermined value.
Calculate the conditional sum
Calculating the conditional sum is useful when you want to see, for example, the total revenue for a product by region.
Conditional sum formulas follow this syntax: if (some condition) then (Measure) else 0. You can also use a sum_if formula, for example:
The following example shows how to figure out the number of customers who bought both products — in this case an iPad and a Galaxy tablet — and then the revenue generated by both:
- Create the formula:
This gives you the number of iPads that were bought.
- Create another formula:
This gives you the number of Galaxy tablets that were bought.
- Using nested formulas, combine these two formulas:
- Search using the
f1 formula to find the revenue generated by both products.
Last modified on September 30, 2026