Beastmode Case Statement with NOT IN operator

DMJerry
DMJerry Member
edited September 2023 in Beast Mode

Tagged:

Best Answer

  • MarkSnodgrass
    edited September 2023 Answer ✓

    You might need to provide more detail, but if you are wondering if you can do this, the answer is yes. The syntax would look like this:

    CASE WHEN fieldname NOT IN ('Georgia','Alabama','Texas') THEN 'exclude' ELSE 'include' END

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.

Answers

  • MarkSnodgrass
    edited September 2023 Answer ✓

    You might need to provide more detail, but if you are wondering if you can do this, the answer is yes. The syntax would look like this:

    CASE WHEN fieldname NOT IN ('Georgia','Alabama','Texas') THEN 'exclude' ELSE 'include' END

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • Thank you but it literally started working after I posted it so I tried to delete my post and could only delete the context and not the post. No clue but it's working.

    Thank you @MarkSnodgrass