I am trying to create a new variable CF_TOTAL that is equal to Delivery '1' + Delivery '2'. See sample code below: IF CAR = '4' AND FOOD = '2' THEN DELIVERY = '1'; ELSE IF CAR = '4' AND FOOD = '1' THEN DELIVERY = '2'; ELSE IF CAR IN ('1','2','3') AND FOOD = '1' THEN DELIVERY = '3'; ELSE IF CAR IN ('1','2','3') AND FOOD = '2' THEN DELIVERY = '4'; ELSE IF CAR = '9' OR FOOD = '9' THEN DELIVERY = '5'; CF_TOTAL = SUM(DELIVERY IN ('1','2')); The problem that I am running into is the CF_TOTAL variable is being split into two groups (0,1) in my table (using proc tabulate) - (0) sum of all other 'Delivery' ; (1) sum of 'Delivery' 1 and 2.
... View more