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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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