IF [Boolean variable here] THEN (do whatever you need to do if true) END
IF NOT [Boolean] then (do whatever should be done if false) END
Upload a packaged workbook. (Let me know what Tableau version you are using.)
I'll check it out.
The error message indicates that one of those fields is not a Boolean but a string. I'm sure you've checked that out though.
I don't know if you've tried this method yet, but it appears that you are taking this as a two step process when you can simplify it to a one step with the below calculation.
IF CONTAINS([servicename], 'Barton') THEN 'Barton'
ELSEIF CONTAINS([servicename], 'Joplin') THEN 'Joplin'
ELSEIF CONTAINS([servicename], 'Ogsleby') THEN 'Ogsleby'
ELSEIF CONTAINS([servicename], 'Westcott') THEN 'Westcott'
ELSEIF CONTAINS([servicename], 'Perspectives') THEN 'Perspectives'
ELSE 'School Location Unknown'
If I understood your use case correctly, the above solution may be able to help you out.
I believe you are just missing equal signs in your if statement.
Instead of IF [Barton Location] TRUE THEN 'Barton' try
IF [Barton Location]=TRUE THEN 'Barton' etc...
Thanks KJ! I had tried the "contains" command earlier but I guess I got the syntax wrong. This worked!!!
Amelia -- That's a good solution, but don't go away thinking that you can't use multiple Booleans in an IF statement.