
Re: Mean and Std deviation for calculated fields
Henric Cronström Sep 17, 2012 3:48 AM (in response to ranjithchevanan)It seems as if you use the the Round() function to create classes of the number NotationalUSD, and then make a histogram of these classes. Correct?
If so, I suggest that you define the classes already in the script by adding a field in your Load statement:
ROUND(NotionalUSD/1000000, .1) as X
Then you can use this as dimension and Count(X) as expression. Using a calculated dimension for something that you can define in the script is inefficient.
Secondly, if you want to calculate the average within each class, you should use
Avg(NotationalUSD) or StdDev(NotationalUSD)
Calculating the average on the rounded number doesn't make sense.
If you instead want to calculate the average for the entire chart, you can do this in the title or the label of the chart. Use the same formula with an equal sign in front:
=Avg(NotationalUSD)
HIC

Re: Mean and Std deviation for calculated fields
ranjithchevanan Sep 17, 2012 4:27 AM (in response to Henric Cronström )Hi,
Thanks. Just using Avg(NotionalUSD) and Stddev(NotionalUSD) helped.
Now, next thing I want to do is display these values inside the chart (Something like Mean=xx.xxx and stddev=yy.yyy). Also, please note that my chart has cyclic dimensions and expressions. When I select NotionalUSD as the dimension I want the mean and stdev calculated and displayed for NotionalUSD. When I click on say another cyclic field "XYZ" i need to display the mean and stddev of "XYZ".
How do I get this done?
Ranjith

Re: Mean and Std deviation for calculated fields
Henric Cronström Sep 17, 2012 8:19 AM (in response to ranjithchevanan)Displaying these values is simple. Just choose Avg(NotationalUSD) as expression and mark "Values of Data Points". Or use the following as chart title/label: ='Mean=' & Avg(NotationalUSD) & ' and stddev=' & StdDev(NotationalUSD)
Linking the dimension and expression so that the expression changes when you change dimension is worse. I do not see any simple way of doing this. I would suggest that you define both groups (cyclic dimension) and cyclic expressions.
HIC

