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

[b]Standard Deviation formula advice[/b]

Status
Not open for further replies.

Jimdeb03

IS-IT--Management
Dec 10, 2002
89
US
I'm trying to calculate standard deviation on a list of fields without much luck in CR version 9

The Report Fields are...
{Samp_Data.SD_1}
{Samp_Data.SD_2}
{Samp_Data.SD_3}
{Samp_Data.SD_4}
{Samp_Data.SD_5}

Crystals StdDev function asks for a valid database or formula field so I tried summing all the above fields in Formula Field 'SumSamp' as...

"({Samp_Data.SD_1}+{Samp_Data.SD_2}+{Samp_Data.SD_3}+{Samp_Data.SD_4}+{Samp_Data.SD_5}"

So in another formula field 'SampDataSTDEV' is the formula
StdDev (@SampDataArray})

...which returns zero

Any suggestions?

And, are there any special circumstances to be aware of when choosing either Crystal or Basic Syntax in the Formula Editor?
 
Try enclosing your fields in brackets and separated by commas such as:

StdDev([{Samp_Data.SD_1},{Samp_Data.SD_2},{Samp_Data.SD_3},etc])

That should do the trick. Summing fields will always return zero since you're trying to return the standard deviation of a single value in that case.
 
Crystal 8.5 includes Standard Deviation as one option for Running Totals, along with Count, Sum, Average etc. It should be at least as good in Crystal 9.

Madawc Williams (East Anglia)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top