|
proc report data=temp nowindows heading;
column Type Date,(Newval n);
define Type /group;
define newVal /display ' ';
define Date /across ' ';
define n / noprint;
run;
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Gobjuka
Sent: Wednesday, March 26, 2008 4:24 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Multiple formats same variable for reporting
Thank you Diskin for your suggestion.
I changed the code as follows, however it gives me the error "There is
No statistic associated with the VAL" on running the proc report.
Any clues ???
data temp;
set temp;
format NewVal $CHAR16.;
if (Type EQ "USD") then Newval = put(Val,dollar10.2); else if
(Type EQ "Mean") then Newval = put(Val,10.2);
else Newval = put(Val,percent8.2);
proc report data=temp nowindows heading;
column Type Newval,Date;
define Type /group;
define newVal /display ' ';
define Date /across ' ';
run;
Thanks,
On Mar 26, 3:29 pm, Dennis.Dis...@PHARMA.COM ("Diskin, Dennis") wrote:
> Hassan,
>
> Pre-process the dataset to format the values as you desire into a
> character variable.
>
> HTH,
> Dennis Diskin
>
>
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SA...@LISTSERV.UGA.EDU] On Behalf Of
>
> Gobjuka
> Sent: Wednesday, March 26, 2008 3:16 PM
> To: SA...@LISTSERV.UGA.EDU
> Subject: Multiple formats same variable for reporting
>
> Hi All,
>
> I have a dataset having field Val that holds value in multiple formats
> if Type = USD then format applied to Val is dollar10.
> if Type = Mean then format applied to Val is 12.2 if Type = PCT_GRP
> then format applied to Val is percent8.2
>
> Data temp;
> input Type $ Date mmddyy6. Val
> cards;
> USD 020106 2000
> USD 020206 2500
> USD 020306 3000
> Mean 020106 22.56
> Mean 020206 10.23
> Mean 020306 15.34
> PCT_GRP 020106 0.15
> PCT_GRP 020206 0.34
> PCT_GRP 020306 0.46
> run;
>
> I am building a report using proc report. Was not sure how this
> multiple formats could be applied on the same value. Any clue ???
>
> proc report data=temp nowindows heading;
> column Type Val,Date;
> define Type /group;
> define Val /analysis ' ' format=;
> define Date /across ' ';
> run;
>
> Thank you,
>
> Hassan- Hide quoted text -
>
> - Show quoted text -
|