I am trying to add a "Case When" statement to my table with contains. I have 2 stings that are alike and it calculates both. How do I distinguish
1) Review and Discussion
2) Review and Discussion Client
Thanks
Hi,
Can you avoid using the contains operator and use the eq (equals) operator instead for the first case?
Regards,
Amir.
I tried that however I am trying to count the occurrence of each time it appear. There are approx. 40 other descriptions that in the row.
Hi,
I think it would be useful if you shared your code (or a sample we can run) with some data in the form of a data step with datalines that we can also run to create the data.
Would the count function help?:
http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002260230.htm
Regards,
Amir.
Simply igore the one you don't want to count
Find(var,"Review and Discussion",'i')>0 and Find(var,"Review and Discussion Client",'i')=0 then Count+1;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.