| Date: | Wed, 27 Apr 2005 00:12:31 -0700 |
| Reply-To: | easwara@GMAIL.COM |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | easwara@GMAIL.COM |
| Organization: | http://groups.google.com |
| Subject: | Proc Report question. |
|
| Content-Type: | text/plain; charset="iso-8859-1" |
|---|
Hi All,
I've the following dataset CCC.
pv_cat Total
--------------
0 40000
1 160000
2 200000
I need to display a report like this:
/------------------------------------------/
PV_CAT | NUM_CUST | %
/------------------------------------------/
HIGH 40000 70%
LOW 160000 30%
TOTAL 200000 100%
/------------------------------------------/
I've used the following Proc report and finding difficulty in
generating the last column of Percentage(%).
proc format library=work;
value category 0 = 'LOW'
1 = 'HIGH'
2 = 'TOTAL'
;
run;
ods html file='c:\sample\PV_dist_PV_for_AP.html' style=sasweb;
/* Report for Yearly Distribution of Profit per Customer by Country
*/
proc report data=CCC nowd headline;
title;
column pv_cat1 total total=percent ;
define pv_cat1 / group 'PV_CAT' format=category.;
define total / 'NUM_CUST';
define percent / analysis pctsum format=percent6. '%';
run;
ods html close;
Instead of 20,80 and 100%, I get the %'s as High=10%,low=40% and and
total=50% .
My need is - out of 100%(200000), there are 20% HIGH value customers
and 80% LOW value customer.
why the resultant percentage is divided by 2? any idea??
Thanks
Easwara
|