Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Proc Tabulate

Status
Not open for further replies.

nobyrnes

Programmer
Mar 20, 2007
15
IE
proc tabulate data=xx;
var amount;
table amount*(n sum);
run;


Two Questions:
1. How can I order by the "sum"?
2. How can I display only the top ten rows ordered by the sum variable?

I know I can use order=freq to order by N, but thats not what I want.
Thanks,
N
 
Sometimes the best thing to do is output the results to a dataset, then use proc report or proc print to display the results. That's the only way I can think to do that, though I'm not an expert on Tabulate.

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top