BookmarkSubscribeRSS Feed
Xodiak
Calcite | Level 5

I"m new to SAS so I apologize if I'm leaving anything out.

I have a column that has costs per member in it.  Over 500k rows each unique members but some costs maybe the same.  I need to filter out that table based on the Total_Cost column and I only want the top 2 percent of cost.  I know how to do this in access, just enter 2% in the Top Values filter in properties,  However I am not sure how to do this in SAS EG 5.1 which is what the company provides us with.

1 REPLY 1
gergely_batho
SAS Employee

First use the Rank Task - this will create a new columns for you with ranks.

Then use a Filter and Sort Task (or Query Builder) and filter on the new created column.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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