Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Four Week Average at Script Level

Here is the file.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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;


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

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;


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert. It Works.

Working, was not concentrating on the repitition of data, my mistake.

Regards

Nassar