Help using Base SAS procedures

proc tabulate

Reply
SAS Employee
Posts: 105

proc tabulate

Hi ,
I have this code:
PROC TABULATE
DATA=HAIM.HAIM_PIDIONOT

;
VAR SUM_PIDION count_policy;
CLASS TOCHNIT_BITUACH / ORDER=UNFORMATTED MISSING;
CLASS PERIOD / ORDER=UNFORMATTED MISSING;
TABLE

PERIOD
all = 'סה"כ' ,

TOCHNIT_BITUACH *(
SUM_PIDION * Sum={LABEL=' '}*F=COMMA14. count_policy * Sum={LABEL=' '}*F=COMMA14. SUM_PIDION ={LABEL='אחוז משורה '}* ColPctSum={LABEL=' '}
) ;
;
RUN;
My problem is when i give the ColPctSum *f=percent6. im not getting what i expected .

For example : 2.6 > im getting 260% > i want to get 2.6%

Is there any options doing it like i want?
SAS Super FREQ
Posts: 8,868

Re: proc tabulate

Hi:
When PROC TABULATE calculates percents, it uses a formula that automatically includes the multiplication by 100 to make the percent. The PERCENT format also multiplies by 100. This means that you have too many places where the multiplication by 100 occurs when you use COLPCTSUM -with- a PERCENT format.

Most folks who use the "percent" statistics with PROC TABULATE (PCTN, PCTSUM, COLPCTN, COLPCTSUM, ROWPCTN, ROWPCTSUM, etc) either
--put a '%' into the column header for the percent and then leave the numbers without a percent sign OR,
--they use a picture format to append a percent sign to the percent calculated by TABULATE, as described here:
http://support.sas.com/kb/36/495.html

cynthia
SAS Employee
Posts: 105

Re: proc tabulate

Hi Cynthia ,

Thank for the information.
I followed the link and it was very helpfull .
Ask a Question
Discussion stats
  • 2 replies
  • 121 views
  • 0 likes
  • 2 in conversation