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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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