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

Mode of Data with Zero's 1

Status
Not open for further replies.
Feb 9, 2009
77
US
I have a report where I am running summaries on a group of data. I have it broken out in the report as data with Rates of 0 and data with Rates <> 0 . I want to get the Mode Rate of data with rates <> 0. Since all of the data is being accounted for, 0 is being included in the calculation so the mode is often 0. Is there anyway to ignore 0's when calculating the mode?
 
you could try using NthMostFrequent function

if NthMostFrequent(1,{field},{grouping}) = 0 then
NthMostFrequent(2,{field},{grouping})
else
NthMostFrequent(1,{field},{grouping})

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top