Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
atoti.where(condition: ColumnCondition, true_value: ColumnConvertible, false_value: ColumnConvertible | None = None, /) → Operation[ColumnIdentifier]
atoti.where(condition: VariableMeasureConvertible, true_value: MeasureConvertible, false_value: MeasureConvertible | None = None, /) → MeasureDefinition
atoti.where(condition_to_value: Mapping[VariableMeasureConvertible, MeasureConvertible], /, *, default: MeasureConvertible | None = None) → MeasureDefinition
Return a conditional measure. This function is like an if-then-else statement:- Where the condition is
True, the new measure will be equal to true_value. - Where the condition is
False, the new measure will be equal to false_value.
None, true_value and false_value must either be both numerical, both boolean or both objects.
If one of the values compared in the condition is None, the condition will be considered False.
Different types of conditions are supported:
- Measures compared to anything measure-like:
- Levels compared to levels, (if the level is not expressed, it is considered
None): - Levels compared to constants of the same type:
- A conjunction or disjunction of conditions using the
&operator or|operator:
Example
True:
See also:
atoti.switch().