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

List top 10 %

Status
Not open for further replies.

ericb123

MIS
Mar 3, 2008
55
US
I have some SQL data that lists users and their error rates. Using the PthPercentile function, I can get the 10th percentile.

In the report header, I'm trying to just list the people who fall into this percentile, before the detail sections.

Is there a way to do this with a formula? Create a list?

My report group is:

userID, errorRate, percentile.

So I'm trying to show in my header that if the userID <= PthPercentile(10, {Command.Rating})

then show a list of UserID's.

Any help is appreciated, thanks!
 
You could insert a crosstab that uses the maximum of this formula for the summary, and also uses it as the row field:

if {command.errorrate} <= pthpercentile(10,{command.rating}) then
{command.userID} else
tonumber({@null})

...where {@null} is a formula created by opening and saving a new formula without entering anything.

Place the crosstab in the report header and then suppress the row label and remove the grid lines.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top