Hello I have data that looks something like this: This is just a sample table from a much larger data set. What I want to do is find a sum of tot_votes but for each variable, rep, lib, ind, isp. Then I want to add the result I get of tot_votes of REP and tot_votes of LIB and make this result into one variable, tot_votes of REP+LIB. (I don't know if I can get tot_votes of rep+lib in one step, I assume you have to do two steps). so I would get something like this IND 19 AS 20 REP/LIB 130 I've tried PROC SORT followed by if then statements to delete everything but REP and LIB and then add but wasn't working out for me and I wasn't sure how to execute it properly. I've also tried to use "RETAIN" and n+1 but I think I am using it incorrectly. I prefer not to use PROC SQL as I haven't been using it for the rest of this code.
... View more