Description
The multiIf function is a conditional logic function that allows you to write CASE statement-like logic more compactly in queries. This function evaluates multiple conditions in the specified order and returns the value corresponding to the first true condition. If none of the conditions are met, it returns the value of the last else expression.
Syntax
Parameters
cond_N: The N-th condition to be evaluated.then_N: The value returned when the N-th condition is true.else: The value returned if none of the conditions are met.
Return Value
- Returns the value of any
then_Nexpression, or the value of theelseexpression if none of the conditions are met.
Example Usage
Notes
- If the
multiIffunction does not include theelsepart, the function will returnNULLwhen all conditions are not met.
