The SAS Output Delivery System and reporting techniques

SAS Reporting based on column

Reply
Occasional Contributor
Posts: 11

SAS Reporting based on column

Hi all,

Please help me out with this simple logic 

my data set is :

probablity      champ     date                        comment

100                xyz         08APR2012            deal closed

100               pqr         09MAY2013            deal closed

90                xyz         22JAN2011             not closed

80               xyz         20FEB2011              deal closed

 

 

and the desired output I want is like:

 

champ      probablity       date                       comment

xyz           100           08APR2012             deal closed

                 90            22JAN2011              not closed

                 80            20FEB2011              deal closed

pqr           100         09MAY2013              deal closed

 

 

Please help me out.

Thanks

 

Super User
Posts: 19,770

Re: SAS Reporting based on column

Posted in reply to Nishant_saxena

Nishant_saxena wrote:

Hi all,

Please help me out with this simple logic 

my data set is :

probablity      champ     date                        comment

100                xyz         08APR2012            deal closed

100               pqr         09MAY2013            deal closed

90                xyz         22JAN2011             not closed

80               xyz         20FEB2011              deal closed

 

 

and the desired output I want is like:

 

champ      probablity       date                       comment

xyz           100           08APR2012             deal closed

                 90            22JAN2011              not closed

                 80            20FEB2011              deal closed

pqr           100         09MAY2013              deal closed

 

 

Please help me out.

Thanks

 


PROC REPORT with a GROUP option for the CHAMP variable? I'm assuming you want a report in the SAS output. It's a listing report so it's pretty straighforward. If you're having issue with a specific component of PROC REPORT post what you have so far and what errors you're getting.

Super User
Posts: 5,498

Re: SAS Reporting based on column

Posted in reply to Nishant_saxena

Even a simple PROC PRINT can do the trick:

 

proc sort data=have;

by descending champ descending probability;

run;

 

proc print data=have;

by champ notsorted;

id champ;

var probability date comment;

run;

Ask a Question
Discussion stats
  • 2 replies
  • 141 views
  • 1 like
  • 3 in conversation