Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a scenario the date is like below
Date | Region | Location | Sales |
2013/Nov | India | Delhi | 89 |
2013/Dec | India | Delhi | 96 |
2014/Jan | India | Delhi | 101 |
2014/Feb | India | Delhi | 99 |
2014/Mar | India | Delhi | 99 |
2014/Apr | India | Delhi | 102 |
2014/May | India | Delhi | 102 |
2014/Jun | India | Delhi | 115 |
2014/Jul | India | Delhi | 122 |
2014/Aug | India | Delhi | 136 |
2014/Sep | India | Delhi | 128 |
2014/Oct | India | Delhi | 143 |
2014/Nov | India | Delhi | 149 |
2014/Dec | India | Delhi | 158 |
2015/Jan | India | Delhi | 172 |
2015/Feb | India | Delhi | 185 |
2015/Mar | India | Delhi | 194 |
2015/Apr | India | Delhi | 263 |
2015/May | India | Delhi | 278 |
2015/Jun | India | Delhi | 333 |
2015/Jul | India | Delhi | 355 |
2015/Aug | India | Delhi | 389 |
2015/Sep | India | Delhi | 389 |
2015/Oct | India | Delhi | 415 |
2015/Nov | India | Delhi | 423 |
2015/Dec | India | Delhi | 445 |
2016/Jan | India | Delhi | 460 |
2016/Feb | India | Delhi | 460 |
2016/Mar | India | Delhi | 480 |
2016/Apr | India | Delhi | 499 |
2016/May | India | Delhi | 522 |
2016/Jun | India | Delhi | 522 |
2016/Jul | India | Delhi | 561 |
2016/Aug | India | Delhi | 588 |
2016/Sep | India | Delhi | 613 |
Here i need to calculate averages like
12 months means last 12 months average and in that we need to exclude max and min vlaues
24 months means last 24 months average and here we need to exclude first 12 months max and min and above 12 months max and min i.e. 2 max values and 2 min values
same for 36 3 max values and 3 min values(for every 12 months one max and min)
Please do the needful.
Thanks
Thiru
Two questions
1) Is this needed in the script or front end?
2) Can you provide the exact output numbers under one of the three scenarios based on your input data above?
Do you mean values are Sales. And what was the expeted o/p
Hi Sunny,
I need script and front end as well.
out put is
12 months
---------------
2015/Aug | India | Delhi | 389 | 9.58 |
2015/Sep | India | Delhi | 389 | 0.00 |
2015/Oct | India | Delhi | 415 | 6.68 |
2015/Nov | India | Delhi | 423 | 1.93 |
2015/Dec | India | Delhi | 445 | 5.20 |
2016/Jan | India | Delhi | 460 | 3.37 |
2016/Feb | India | Delhi | 460 | 0.00 |
2016/Mar | India | Delhi | 480 | 4.35 |
2016/Apr | India | Delhi | 499 | 3.96 |
2016/May | India | Delhi | 522 | 4.61 |
2016/Jun | India | Delhi | 522 | 0.00 |
2016/Jul | India | Delhi | 561 | 7.47 |
2016/Aug | India | Delhi | 588 | 4.81 |
2016/Sep | India | Delhi | 613 | 4.25 |
here 9.58 and 0 s we need to exclude
24 months
--------------
2014/Aug | India | Delhi | 136 | 11.48 |
2014/Sep | India | Delhi | 128 | -5.88 |
2014/Oct | India | Delhi | 143 | 11.72 |
2014/Nov | India | Delhi | 149 | 4.20 |
2014/Dec | India | Delhi | 158 | 6.04 |
2015/Jan | India | Delhi | 172 | 8.86 |
2015/Feb | India | Delhi | 185 | 7.56 |
2015/Mar | India | Delhi | 194 | 4.86 |
2015/Apr | India | Delhi | 263 | 35.57 |
2015/May | India | Delhi | 278 | 5.70 |
2015/Jun | India | Delhi | 333 | 19.78 |
2015/Jul | India | Delhi | 355 | 6.61 |
2015/Aug | India | Delhi | 389 | 9.58 |
2015/Sep | India | Delhi | 389 | 0.00 |
2015/Oct | India | Delhi | 415 | 6.68 |
2015/Nov | India | Delhi | 423 | 1.93 |
2015/Dec | India | Delhi | 445 | 5.20 |
2016/Jan | India | Delhi | 460 | 3.37 |
2016/Feb | India | Delhi | 460 | 0.00 |
2016/Mar | India | Delhi | 480 | 4.35 |
2016/Apr | India | Delhi | 499 | 3.96 |
2016/May | India | Delhi | 522 | 4.61 |
2016/Jun | India | Delhi | 522 | 0.00 |
2016/Jul | India | Delhi | 561 | 7.47 |
2016/Aug | India | Delhi | 588 | 4.81 |
2016/Sep | India | Delhi | 613 | 4.25 |
here 9.58 and 0 s we need to exclude for 2016 to 2015
and 35.57 and -5.88 we need to exclude for 2015 to 2014
this values for calculating average we need to exclude and calculate average.
In front end we have to show the excluded values.
I am working on the qvd file,i will uplaod ASAP once it is done
Thanks
Thiru
Hi Anil,
Yes Normally average means we will take 12 values,but here we need to exclude max and min vlaues per year while calculating the average.
Thiru
Have you tried any expression, Or Else please share me application
Dimensions are -
Date, Region, Location, Sales |
12 Months -- Avg({<Date = {"$(=AddMonths(Date,-12))"}, Sales -= {"$(=Max(Sum(Sales)))", "$(=Min(Sum(Sales)))"}>}Sales)
24 Months -- Avg({<Date = {"$(=AddMonths(Date,-24))"}, Sales -= {"$(=Max(Sum(Sales)))", "$(=Min(Sum(Sales)))"}>}Sales)
I am not sure, This way we can achieve. Would you able to provide sample
=avg({<sales = -{"=Max(sales)"}>}sales)..exclude maximum sales
=avg({<sales = -{"=Min(sales)"}>}sales).....exclude minimum sales