Is it possible to calculate an mean, median, mode, standard deviation, etc. of a column of data?
In general, is it possible to do these sorts of math calculations i
Here is Median()
From Report Design Tips and Tricks...
Scenario 1
1: In Report Designer, open the Report Properties dialog box and click the Code tab. Define an array, a function that takes a value and adds it to the array, and a function that calculates the median value from the array;
Dim values As New SystemCollections.ArrayList
Function AddValue(newValue As Decimal) As Decimal
values.Add(newValue)
AddValue = newValue
End Function
Function GetMedian() As Decimal
Dim count As Integer = values.Count
If (count > 0)
values.Sort()
GetMedian = values(count\2)
End If
End Function
2: Wrap the call to the function in an aggregate and add it to an expression in the detail rows.
=Max(Code.AddValue(Fields!field.Name))
3: From a text box in the table footer, call into GetMedian() to retrieve the value
=Code.GetMedian()