Hi,
I am creating a new column called "group" in my dataset based on the value of another column. The real code I run has many more if conditions but the "group" column has only 3 values; indeterminate, not performance, performance. The 'reason' has no blank values in mydata.
data mydata;
set mydata;
if reason = "asd asd asd" then group = "indeterminate";
if reason = "abc abc abc" then group = "indeterminate";
if reason= "xxx" then group="not performance";
if reason= "yy" then group="performance";
if cancellation_reason="" then cancellation_grouping="missing";
run;
In the output, some certain group values are blank. They didn't get assigned to any of the 3 values. For example, assume the reason "asd asd asd" is one of the values of 'reason' with blank 'group' in the output. Then I search for it in the data, it does not return any output.
proc sql;
select reason, group
from mydata
where reason = 'asd asd asd' ;
quit;
Somehome, the data seems it does not have this 'asd asd asd' value in the 'reason' column eventhough I exactly copy-pasted from the data itself. What could be the reason for this and how to solve it?
... View more