BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sreevatsan1991
Obsidian | Level 7

Sorry , I am just getting used here.   Its message number 7.

PaigeMiller
Diamond | Level 26

@sreevatsan1991 wrote:

Sorry , I am just getting used here.   Its message number 7.


Message 7 doesn't show me any data. The problem may be (I don't know for sure) that somehow the web site renumbers the posts and so it used to be message 7. (@ChrisHemedinger -- does the web site do this?)

 

Or maybe you just got it wrong.

 

But its time we stop this. No one knows what you want.

 

I am requesting that @sreevatsan1991 start over from scratch, and write as clear as possible explanation, plus clear example of both your input data, and the desired output data, and clear explanation of the method of going from input to output. You need to make sure you have written complete and clear descriptions, and provided clear and complete example input data sets and clear and complete output data sets for this example. Emphasis on clear. Emphasis on complete. Double emphasis on clear. Thank you.

--
Paige Miller
mkeintz
PROC Star

Your  displayed desired data appears to be the UNION of the top 3 within several distinct categories.  So if an observation in in the top 3 of customer and also of orders you do not want that record duplicated.  Is that correct?

 

I've reread this, and I don't think I understand it yet.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
ChrisHemedinger
Community Manager

Getting back to the original ask from @sreevatsan1991 , here are some resources to help.

 

https://video.sas.com/detail/video/4768437994001/sas-enterprise-guide-tip:-creating-a-grouped-top-n-...

 

And if you're using SAS Enterprise Guide, you'll find sample programs for Top N reports (including support for grouping) in the .\Sample\Code folder within the install directory.

 

Chris

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
sreevatsan1991
Obsidian | Level 7
The problem was sorting the data before ranking and trying in EG really helped me to figure out how to do in base. Thanks a lot !
mahibhu
Calcite | Level 5
if i need to get the top10% & bottom 10% by each group.
sreevatsan1991
Obsidian | Level 7

Hi @mkeintz  Whatever you had strike, that's exactly what am looking for !


SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 21 replies
  • 6979 views
  • 2 likes
  • 7 in conversation