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
SAS Super FREQ
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 .

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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