Summary
The If Then Split block conditionally routes all data into one of two outputs — True or False — based on a single logical formula that is evaluated once over the entire dataset connected to the test input. The formula must return either true
or false
. The output branch that is not selected is halted (see below), so downstream blocks on that branch will not execute and there are no side effects.
How does it work?
- test (mandatory) — connect a dataset here. The formula is evaluated a single time on the complete dataset provided to
test
. - data (optional) — if connected, the dataset coming from
data
(instead oftest
) is routed into the chosen output.test
is still always used for evaluating the formula. - Formula — configured in the block options. Must evaluate to a boolean (
true
orfalse
) when applied to the wholetest
dataset (or a subset defined inside the formula).
Halting Behavior
The non-selected output branch is marked halted. Halted branches are not executed at all — any downstream blocks connected (directly or indirectly) to a halted branch will not run. Halted branches produce no side effects.
Options
Formula
Enter a single logical expression that is evaluated once on the complete test
dataset. The expression must evaluate to true
or false
. Use Omniscope aggregate and SUBSET functions to compute dataset-level statistics or to evaluate conditions on specific subsets.
Examples Using Omniscope SUBSET Functions:
These formulas are dataset-level checks — they return a single boolean and therefore route all data to either True or False.
Example 1 — Route by average sales for a region
Route all data to True if the average sales in Region A exceed 100,000:
SUBSET_MEAN([Sales], SUBSET([Region], "Region A", "=")) > 100000
- If the expression is
true
, all data (fromdata
if connected, otherwise fromtest
) goes to True. - If
false
, all data goes to False.
Example 2 — Route by unique customers in a category
Route to True if there are more than 1,000 unique customers in the "Premium" category:
SUBSET_UNIQUECOUNT([Customer ID], SUBSET([Category], "Premium", "=")) > 1000
Example 3 — Route by an intersection subset (region + channel)
Check whether the mean sales for online sales in Region A exceed 50,000:
SUBSET_MEAN( [Sales], INTERSECTION( SUBSET([Region], "Region A", "="), SUBSET([Channel], "Online", "=") ) ) > 50000
Notes on SUBSET usage
SUBSET(field, value, op)
defines a subset filter; these filters can be combined withINTERSECTION
,UNION
, etc.SUBSET_*
aggregates (e.g.,SUBSET_SUM
,SUBSET_MEAN
,SUBSET_MEDIAN
,SUBSET_COUNT
,SUBSET_UNIQUECOUNT
) compute a single value for the chosen subset — ideal for dataset-level formulas used by this block.
Outputs
- True — receives all data when the formula evaluated on the
test
dataset istrue
. If the optional data input is connected, that dataset is routed here instead. - False — receives all data when the formula evaluated on the
test
dataset isfalse
. If data is connected, that dataset is routed here instead. - The branch that is not chosen is halted — downstream blocks on that branch do not execute.
Examples summary
- The formula is evaluated once on the entire
test
dataset (or on a subset defined inside the formula). - The boolean result routes all data to either True or False.
- Use
SUBSET_*
functions and subset combinators (INTERSECTION
,UNION
, etc.) to compute dataset-level metrics for the decision.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article