Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Here is the file.
You have to aggragate per week first. Try this:
temp1:
LOAD
[Fiscal Week Ending] ,
sum([Sales Out $]) as Sales
from US.xls (biff, embedded labels, table is "Sheet 1$") group by [Fiscal Week Ending];
final:
load *,
Rangesum(Sales,peek(Sales,-1),peek(Sales,-2),peek(Sales,-3))as myRollingAvg
Resident temp1;
drop table temp1;
You have to aggragate per week first. Try this:
temp1:
LOAD
[Fiscal Week Ending] ,
sum([Sales Out $]) as Sales
from US.xls (biff, embedded labels, table is "Sheet 1$") group by [Fiscal Week Ending];
final:
load *,
Rangesum(Sales,peek(Sales,-1),peek(Sales,-2),peek(Sales,-3))as myRollingAvg
Resident temp1;
drop table temp1;
Thanks Gysbert. It Works.
Working, was not concentrating on the repitition of data, my mistake.
Regards
Nassar