Create a Top N report in SAS


The SAS support site has a new example of how to create a Top N report using SAS.

The Top N report is pervasive in our society. From the Billboard Top 100 to the New York Times Best Sellers list to the Forbes list of the 100 Richest Americans, the Top N list is a medium that we can all understand: which are the top “whatevers” that stand out from the rest?

Businesses rely on reports like these every day. It begins with what seems like a simple question. For example:

  • "Who are our top ten customers, measured by amount of sales?"
  • "Who are the ten most effective sales associates in each region?"
  • "Which are the five top-selling brands for each product family that we distribute?"

The example includes 4 different SAS programs that do the job.

If you don't like to program, then you can use the custom task (click for picture) for SAS Enterprise Guide instead, and get it done with point-and-click. (See the Downloads tab in the sample get to the custom task.)

As with all SAS samples, your feedback is welcome and encouraged. Did the sample help you? Is it clear how to use it? Did you (gosh forbid) find a problem with it? Let us know.


About Author

Chris Hemedinger

Senior Manager, SAS Online Communities

+Chris Hemedinger is the manager of SAS Online Communities. Since 1993, Chris has worked for SAS as an author, a software developer, an R&D manager and a consultant. Inexplicably, Chris is still coasting on the limited fame he earned as an author of SAS For Dummies.  He also hosts the SAS Tech Talk webcasts each year from SAS Global Forum, connecting viewers with smart people from SAS R&D and the impressive work that they do.


  1. Pingback: Upcoming SAS Talks: Custom tasks for SAS Enterprise Guide - The SAS Dummy

  2. Pingback: Custom tasks for SAS Enterprise Guide: Q&A - The SAS Dummy

Leave A Reply

Back to Top