BookmarkSubscribeRSS Feed
Nishant_saxena
Calcite | Level 5

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

 

2 REPLIES 2
Reeza
Super User

@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.

Astounding
PROC Star

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;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1298 views
  • 1 like
  • 3 in conversation