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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to select top 3 values?

Status
Not open for further replies.

gbfell

Programmer
Dec 11, 2001
27
US
I have a field that i want to select the top 3 values from. how can i do this?
 
Is this top 3 for grouped data or individual records? Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
these are for indivdual records. i found a way to do it, i put a field in the details section, record number, then used the select expert and said where less than 4. this is assumming my table i'm pulling it from always sorts descending. but, how would i do it if the table was not in order? how could i say, sort this field descending, then print only the top 3? this is just for my understanding. like i said i got it to work really easily, i just want to learn.
 
If the table is not in order you would have to sort it in descending order, then either conditionally suppress or filter the data as you have done.

If you want to do this with group values, you can use the Top-N expert. Software Training and Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top