Introduction
Evaluates an expression against a list of values and returns the corresponding result of the first matching value. If no match is found, the default result is returned if provided.
FORMULA | SWITCH(expression, value1, result1, value2, result2, ..., [defaultResult]) |
EXAMPLE FORMULA | SWITCH(Col_1, 10, "Low", 15, "Moderate", 20, "High", "No Match") |
EXAMPLE INPUT | 20 |
EXAMPLE OUTPUT | HIGH |
Sample Usage
Valid Examples | Invalid Examples |
SWITCH(Monthly Units, 3,"Low", 724,"high") | SWITCH(Location, USA,"Low", Europe,"high") |
SWITCH(Location, "USA","10", "EU", "13") |
Notes
- SWITCH can only be used with a text column as input when quotes are present
See Also
Still having issues? Contact us at [email protected]
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