BookmarkSubscribeRSS Feed
mdavidson
Quartz | Level 8
I'm trying to rank query results, what I currently have is a count by individual name. What I'm trying to accomplish is a "rank" field that looks like the following below. The "RANK" function in SAS EG doesn't seem to provide me with the results I'm looking for. Can someone point me in the right direction?

Name Count Rank
Mike 32 1
Bill 29 2
Jim 24 3
Cindy 24 3
Bob 19 5
Dave 17 6 Message was edited by: mdavidson
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
I think that what you want to use is the RANK Task under the Data Tab. If it returns mid-ranks (3.5's where you have 3's), you can use the FLOOR function in the query to remove the decimal part.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 1058 views
  • 0 likes
  • 2 in conversation