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;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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