Skip to main content
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.

Formula operators

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:
  1. Create the formula:
    This gives you the number of iPads that were bought.
  2. Create another formula:
    This gives you the number of Galaxy tablets that were bought.
  3. Using nested formulas, combine these two formulas:
  4. Search using the f1 formula to find the revenue generated by both products.

Where to go next

Last modified on September 23, 2026