BookmarkSubscribeRSS Feed
yonib
SAS Employee
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?
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
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
yonib
SAS Employee
Hi Cynthia ,

Thank for the information.
I followed the link and it was very helpfull .

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1084 views
  • 0 likes
  • 2 in conversation