Hello,
The expression syntax for VA is limited compared to other systems. In a calculated item, you would need to use nested IF statements. Not very elegant but it works.
You could achieve the same result by using a custom category , which is a more GUI-based approach.
If you have permissions to change the source table, then you have more options. PROC SQL, for example. This would be ideal if your expression might become more complex than what you shared above.
Sam