XOR
Category: Logical functions
Overview
Description | Connects two inputs with the logical ‘exclusive or’ XOR and returns true (1) if exactly one of the input values is true and false (0) otherwise. Use when you need a 1/0 flag that becomes true only if exactly one of two inputs is true. |
|---|---|
Syntax |
|
Parameters |
|
Limitations | Both input nodes must have the same dimensionality; otherwise rows are excluded from the function output. |
Examples
Typical use
This example shows that XOR returns 1 only when exactly one input is true. If both inputs are true or both are false, the result is 0.
Input node: A
Year | Value |
|---|---|
2025 | 17 |
2026 | 0 |
2027 | 0 |
2028 | 1 |
Input node: B
Year | Value |
|---|---|
2025 | 1 |
2026 | 0 |
2027 | 1500 |
2028 | 0 |
Formula: XOR('A', 'B')
Year | → XOR Result |
|---|---|
2025 | 0 |
2026 | 0 |
2027 | 1 |
2028 | 1 |
Limitations
Both input nodes must contain the same levels, otherwise the function will consider only the more granular function while ignoring the function with fewer levels.

Example of the limitation: The function is given two EXPANDSINGLE() inputs. However, one of the EXPANDSINGLE() functions possesses more levels than the other, resulting in different granularity. The function with more levels is the leading function. This leads to unexpected outputs from the XOR() function.