Try nested IF statements containing DO statements for efficiency: Not sure if it's possible to have last 6m sales blank and last 9m sales not blank, but if you have to have last 6m sales to get last 9m sales, then this should work for you: data want; set have; If Service^="O1" then do; Status="Others"; end; Else do; If "last 6m sales"n^="" AND "last 9m sales"n="" then Status="Call Back"; Else if "last 6m sales"n="" AND "last 9m sales"n="" then Status="Gone"; Else Status="Active"; end; run;
... View more