microstrategy

How to use the Not Like operator in microstrategy?


ERROR IMAGEI am trying to create a new attribute and for that, I need to use the Not Like operator. But when I use it, I am given an error which says "Validation failed with syntax error".

Case(((State@ID="Closed") And (Title@ID Like "DEV -%")), "SIT", ((State@ID="Closed") And (Title@ID not  like "DEV -%")), "Closed", (State@ID="Ready To Test"), "SIT", (State@ID="New"), "Unknown", "Development")

Solution

  • The following statement should work:

    Case(((State@ID="Closed") And (Title@ID Like "DEV -%")), "SIT", ((State@ID="Closed") And (NOT(Title@ID like "DEV -%"))), "Closed", (State@ID="Ready To Test"), "SIT", (State@ID="New"), "Unknown", "Development")

    "NOT" needs to be written as: NOT(x, y)

    If you need more powerful comparisons check the passthrough functions (ApplySimple etc) in the docs.