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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1356 views
  • 0 likes
  • 2 in conversation