Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have to calculate average and standard deviation of sales count (year wise). attached sample data here.
Could you please assist on this.
Thanks,
Nihhal.
yearwise means you need salesperson average?
try this
yes shivesh, i have to show standard deviation in bell chart.
try change the dimension to saleperson or year if you want year
std dev = aggr( nodistinct Stdev( num([SALES COUNT]) ),SALESPERSON)
avg = aggr(nodistinct avg(num([SALES COUNT])),SALESPERSON)
Hi Rodell, thanks for your response.
And I have checked attachment, it seems unexpected values.
As per your attachment, for year (2014), sales count values as 100, 120, 110 and avg values as follows 110, 110, 110
and stdev values as follows 10, 10, 10. I am suspecting here i think stdev values should follow as -10, 10, 0.
what you say? please advice if am wrong.
Nihhal.
hi Nihhal
you are seeing repetitive values because of the NO DISTINCT clause I put in the aggregation function.
for the sake of example and you can remove that
/*avg and std dev per person */
from
std dev = aggr( nodistinct Stdev( num([SALES COUNT]) ),SALESPERSON)
avg = aggr(nodistinct avg(num([SALES COUNT])),SALESPERSON)
to
std dev = aggr( Stdev( num([SALES COUNT]) ),SALESPERSON)
avg = aggr( avg(num([SALES COUNT])),SALESPERSON)
/*avg and std dev per year */
from
std dev = aggr( nodistinct Stdev( num([SALES COUNT]) ),YEAR)
avg = aggr(nodistinct avg(num([SALES COUNT])),YEAR)
to
std dev = aggr( Stdev( num([SALES COUNT]) ),YEAR)
avg = aggr( avg(num([SALES COUNT])),YEAR)
Hi,
Please use dimension as YEAR and expression as aggr(Avg([SALES COUNT]),YEAR) for Average
aggr(Stdev([SALES COUNT]),YEAR) for SD
sure i will try this and actually i need to show standard division like bell chart (graphical) not in table charts.
ok , let me check for bell one.