BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mattneo
Obsidian | Level 7

Hi. I have a database connected to SAS VA. This database contains all customer correspondence, and one of the data item is “Case title”, which is the subject title for a case. Out of the hundreds and thousands of cases in the database, I want to retrieve cases that have specified keywords (eg. “poor service”, “bad attitude”) in the title.

 

I went to advanced filter and use the following expression:

UPCASE( Case title) contains UPCASE(“poor service”)

Sure enough, the list table shows only cases with “poor service” in the titles. However I also need cases with “bad attitude” in the same list table. I tried the following with the OR operator:

UPCASE( Case title) contains OR( UPCASE(“poor service”)

                                                          UPCASE(“bad attitude”)

It doesn’t work. Threw up an error saying Boolean used but expecting Character or something. Please help. How can I retrieve cases based on a set of keywords?

1 ACCEPTED SOLUTION

Accepted Solutions
Sam_SAS
SAS Employee

It is inelegant, but you should be able to use:

OR (UPCASE(Case title) contains UPCASE("poor service")
UPCASE(Case title) contains UPCASE("bad attitude")))

 

That is, repeat the entire condition for each OR case.

 

There may also be a much better solution someone else could offer 🙂

View solution in original post

2 REPLIES 2
Sam_SAS
SAS Employee

It is inelegant, but you should be able to use:

OR (UPCASE(Case title) contains UPCASE("poor service")
UPCASE(Case title) contains UPCASE("bad attitude")))

 

That is, repeat the entire condition for each OR case.

 

There may also be a much better solution someone else could offer 🙂

mattneo
Obsidian | Level 7
Thanks sam. It works! I actually have more keywords so i guess i have to keep adding OR operators. If theres a more efficient way, like to reference a list of words the user enters, will love to hear it.... But this will do for now. Thks again

sas-innovate-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 402 views
  • 0 likes
  • 2 in conversation