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

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 21 replies
  • 5494 views
  • 2 likes
  • 7 in conversation