Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
i have a table that looks like this dates and number of sales
Date | Sale |
23/12/2013 | 2 |
22/12/2013 | 5 |
21/12/2013 | 5 |
20/12/2013 | 5 |
19/12/2013 | 6 |
18/12/2013 | 1 |
17/12/2013 | 2 |
16/12/2013 | 3 |
i need to show a graph for each day the avg sale amount of the 3 prev days
for example on the 23/12/13 the Avg3DaySale will be (5+5+5)/3
22/12/13 the Avg3DaySale will be (5+5+6)/3
Date | Sale | Avg_3DaySale |
23/12/2013 | 2 | 5 |
22/12/2013 | 5 | 5.333333 |
21/12/2013 | 5 | 4 |
20/12/2013 | 5 | 3 |
19/12/2013 | 6 | 2 |
18/12/2013 | 1 | 2.5 |
17/12/2013 | 2 | 3 |
16/12/2013 | 3 | #DIV/0! |
my big limitation is that i cant do this in the script i have to do this with a set analysis in the gui
any ideas?
You can use the above function. But if today is Monday, should it average Thu, Fri and Mon?
This is a better solution. See attached
do you mean a similar expression?
RangeAvg( above( sum(Sale),0,3) )
yes correct
it doesn't work if i have 2 dimensions
like if i have something like this
the 2 day sum col will sum up by date and category
Rangesum( above( sum(Sales),0,2) )
Date | category | sales | 2 day sum |
26/12/13 | shoe | 0.00 | 0.00 |
27/12/13 | shoe | 3.00 | 3.00 |
28/12/13 | shoe | 1.00 | 4.00 |
29/12/13 | shoe | 1.00 | 2.00 |
30/12/13 | shoe | 1.00 | 2.00 |
31/12/13 | shoe | 13.00 | 14.00 |
01/01/14 | shoe | 7.00 | 20.00 |
26/12/13 | dress | 3.00 | 3.00 here is where i have a problem |
27/12/13 | dress | 0.00 | 3.00 |
28/12/13 | dress | 0.00 | 0.00 |
29/12/13 | dress | 2.00 | 2.00 |
30/12/13 | dress | 1.00 | 3.00 |
31/12/13 | dress | 6.00 | 7.00 |
01/01/14 | dress | 7.00 | 13.00 |
Hi Jonathan,
Check this link you will get clear idea about rangesum and rangeavg .
Rangesum Above ,Below and Before,After and Range Avg
regards
Mahesh T