Logical functions

Use this category when you need conditions, comparisons, and branching logic in formulas.

These functions help you build boolean-style expressions, typically represented as 1 or 0, and use them to select values, create flags, or diagnose unexpected results.

Start here if…

  • You are looking up a logical function by name, for example IF, EQ, GT, AND, TRUE, FALSE, or IS_NA
  • You want to compare similar logical functions and understand when to use which one
  • You need function-specific notes, limits, or troubleshooting

Not here if…

Mental model

  • Logical functions usually return 1 or 0 across the same dimensionality as their inputs
  • Conditions are most commonly used inside IF to select between two results
  • Missing values can affect conditions; use IS_NA when results look unexpectedly empty or incomplete

Common patterns

Apply a business rule

Use when you want to cap, floor, or branch values based on a condition.

IF('Margin' < 0, 0, 'Margin')

Create a threshold flag

Use when you want to mark where values exceed a threshold.

GT('Revenue', 100000)

Compare two nodes for equality

Use when you want to create match or mismatch flags for validation.

EQ('Actuals', 'Plan')

Combine multiple conditions

Use when you want to build between-rules or multi-part checks.

AND(GT('Node', 0), LT('Node', 10))

Invert a condition

Use when you want the opposite of an existing rule.

NOT(EQ('Status', 1))

Check for undefined values

Use when you want to flag undefined values before comparisons.

IS_NA('Node')

Functions in this category

Branching

FunctionDescription
IFReturns value_if_true when a condition is true; otherwise returns value_if_false.

Function equivalents of operators

FunctionDescription
EQ (=)Returns 1 (true) if matching row values across two nodes are equal; otherwise 0 (false).
NEQ (!=)Returns 1 (true) where matching values of two nodes are not equal.
GT (>)Returns 1 (true) where the first input is greater than the second.
GTE (>=)Returns 1 (true) where the first input is greater than or equal to the second.
LT (<)Returns 1 (true) where the first node’s values are less than the second.
LTE (<=)Returns 1 (true) where the first node’s values are less than or equal to the second.
AND (&&)Returns 1 (true) if both inputs are true; otherwise 0 (false).
OR (||)Returns 1 (true) if at least one of the two inputs is true; otherwise 0 (false).
NOTInverts logical values (non-zero becomes 0; zero becomes 1).
XORReturns 1 (true) if exactly one of two inputs is true (exclusive OR).

Defined / undefined helpers

FunctionDescription
TRUEReturns 1 (true) for every defined value in the node.
FALSEReturns 0 (false) for every defined value in the node.
IS_NAReturns 1 (true) where values are undefined in the input node’s dimensionality; otherwise 0.

Choosing between similar functions

IF vs flags (EQ/GT/LT/…)

  • Use EQ, GT, LT, and similar functions when you need a 1/0 flag for validation, filtering, or diagnostics
  • Use IF when you want to return one of two result values

EQ vs NEQ

  • Use EQ to mark matches
  • Use NEQ to mark mismatches

GT/GTE vs LT/LTE

  • Use GT or GTE for above-threshold rules
  • Use LT or LTE for below-threshold rules

AND/OR vs XOR

  • Use AND when all conditions must hold
  • Use OR when any condition may hold
  • Use XOR when exactly one condition should hold

IS_NA vs FALSE/TRUE

  • Use IS_NA to detect undefined values
  • Use TRUE or FALSE when you want a defined 1 or 0 result across the defined intersections of a node

Pitfalls & troubleshooting

  • IF result looks incomplete: check whether the condition is undefined for some intersections; use IS_NA to spot where inputs are missing
  • Cube size risk: IS_NA expands to a fully expanded cube and can hit maximum cube size
  • Conditions look wrong: check both operands at the same intersection in Data preview; the root cause is often upstream values, not the comparison itself
  • Multi-part logic is hard to debug: split logic into helper nodes, then combine with AND or OR
  • Between logic: make it explicit with AND(GTE(...), LTE(...)) rather than relying on a single comparison
  • Missing vs zero confusion: review Troubleshooting guide when results look unexpectedly false or empty
Was this page helpful?