https://www.powerupbusiness.net/table...
The syntax of the IF statement in Tableau is straightforward. It follows a similar structure to Excel IF(condition, value_if_true, value_if_false). You specify the condition you want to evaluate, and Tableau returns the value_if_true if the condition is met, and the value_if_false otherwise.
IF [test1] THEN [then1]
ELSEIF [test2] THEN [then2...]
ELSE [default]
END