Forum Discussion
Anonymous
4 years agoNot applicable
SWITCH TRUE with multiple conditions
Hi, Would someone be able to tell me why my SWITCH(TRUE() function with multiple conditions is returing wrong anwers? Just look at row 2 in of the attached screenshot - it should return "Group 4"...
- 4 years ago
Anonymous , use the brackets (condition || condition) && (condition || condition).
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
ERD
Community Champion
4 years agoAnonymous , use the brackets (condition || condition) && (condition || condition).
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
- AlexisOlson4 years ago
Super User
Yep, in logical statements && comes first in order of operations before ||, like multiplication comes before addition.
A && B || C = ( A && B ) || C just like A * B + C = ( A * B ) + C.