12-08-2016 10:27 AM
I want to make a report that shows the sums of four columns plus the ratios or percentages of three of the sums to the other sum. Is it possible to do this in one TABULATE or REPORT step? See the code for what I have so far. What I want to add is the sums of b, c, and d as a percentage of the sum of a, for each row--the last three columns of the example table.
It's easy to do this in two steps, but I was wondering if I could do this in only one.
/*what I have so far */ PROC TABULATE DATA=STUFF; WEIGHT weight; CLASS rowvar; VAR a b c d; TABLE rowvar, (a b c d)*SUM ; RUN;
12-08-2016 11:14 AM
For a special treat see what happens if you use COLPCTSUM or ROWPCTSUM instead of PCTSUM. HINT: SAVE your data and program code before executing the code. Unless they have fixed the compiler recently to check for that usage you may generate a SAS system crash.
Need further help from the community? Please ask a new question.