Desktop productivity for business analysts and programmers

Filtering a column based on top 2%

Reply
New Contributor
Posts: 2

Filtering a column based on top 2%

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.

SAS Employee
Posts: 340

Re: Filtering a column based on top 2%

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.

Ask a Question
Discussion stats
  • 1 reply
  • 246 views
  • 0 likes
  • 2 in conversation