BookmarkSubscribeRSS Feed
WorkUser
Obsidian | Level 7

Good morning,

 

Is there a way to show a top 10 list using the query builder or summary tables in SAS EG? For example, I have Date, Company, and Sales columns that I would like to only show the top 10 companies with the most sales. I tired to just display the data in summary tables then just take the top 10 rows but the dataset is too large and got a SAS warning that it will take too long to output the summary table.  

 

Thanks 

3 REPLIES 3
ballardw
Super User

Top 10 by exactly what rules? You say "most sales". Is that 1) most individual items sold; 2) most unique items sold; 3) most customers; 4) most total currency value of sales; 5) most number of transactions or something else?

 

You might share the code generated as there are so many things that could go on in picking options we can't tell what you actually did.

How many records are in your data set?

WorkUser
Obsidian | Level 7

The data set has over 5 years of records with daily sales. by most sales I mean sum of currency value of sales. for example I would like to show the top 10 companies with the most sales in the month of April 2020. I used the Query Builder tool so I just dragged the mentioned dataset and use summary tables to show sum sales in months but I'm trying to limit the list so I wont get this warning: 

SCreen.png

ballardw
Super User

If you are only interested in a specific time period then subset the data for that period first into a new data set. Then summarize and sort by descending total sales. Report of the first 10 rows.

 

It still helps to show the generated code. Then we have a better idea what you actually asked the system to do.

 

 

 

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 992 views
  • 0 likes
  • 2 in conversation