BookmarkSubscribeRSS Feed
alexgouv
Obsidian | Level 7

Hi, 

 

I am trying to find the number of accounts that are responsible for the top 25%, 50%, and 75% of sales in each region. The final output needs to be something like 4 accounts make up the top 25%, 9 make up the top 50%, etc.

 

If there is a way to flag which group each account is in that would be ideal but any guidance would be helpful at this point. 

1 REPLY 1
Reeza
Super User
Depends on the data structure overall, but using PROC RANK should work.

proc rank data=have out=want groups=4;
by region;
var sales;
rank rankSales;
run;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 404 views
  • 1 like
  • 2 in conversation