As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Tips:Getting % sign in PROC TABULATE

From sasCommunity
Jump to: navigation, search

Some users want to have a percentage sign in the PROC TABULATE RESULTS when they are using PCTN and PCTSUM measures. Below is a suggestion to getting the symbols into the table.

data COMPREV;
    input COUNTRY COMPUTER REV90 REV91 REV92;
    datalines;
1 1  788.8 877.6 944.9
1 2  12538.1 9855.6 8527.9
1 3  9815.8 6340.3 8680.3
1 4  3147.2 3474.1 3722.4
1 5  18660.9 18428.0 23531.1
2 1  469.9 495.6 448.4
2 2  5697.6 6242.4 5382.3
2 3  5392.1 5668.3 4845.9
2 4  1511.6 1875.5 1924.5
2 5  4746.0 4600.8 4363.7
;
run;
 
 
proc format;
    picture PCTFMT LOW-HIGH='009 %';
run;
 
 
proc tabulate data = COMPREV;
    class COUNTRY COMPUTER / MISSING;
    table COUNTRY * COMPUTER, PCTN * F = PCTFMT9.;
run;

....read more

Submitted by Murphy Choy. Contact me at my Discussion Page.