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!

Conditional formatting the top N values

Status
Not open for further replies.

henryc1

Technical User
Feb 25, 2005
4
US
How can I conditionally format text of the top N values, or to P percentile, as opposed to simply >= a value.

For example, instead of saying:

If Table.Field > 500 then crBold

I want to say:

If Table.Field is in the top 10 then crBold

Help!!

Thanks
 
One more thing, I want to format based on the top N in each group. Thanks.
 
I tried

if {BIN_COUNT.BIN_CNT} >= PthPercentile (80,{BIN_COUNT.BIN_CNT}, GroupName ({@Time})) then crRed else crBlack

and I get the error "The summary/running total field could not be created
 
Do you have a group inserted on {@time}? If so, then your formula should be:

if {BIN_COUNT.BIN_CNT} >= PthPercentile (80,{BIN_COUNT.BIN_CNT}, {@Time}) then crRed else crBlack

For topN, you can add the special field groupnumber to your group header/footer and then use a formula like:

if groupnumber <= N then crRed else crBlack //where N=your topN value

Or instead of groupnumber you can use a running total that resets on change of group.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top