You want a size 5 window centered on the current observation.
PROC EXPAND is the way to go, assuming you have the sas/ets product. But if you don't, then this program will do:
data have;
input week sales promo;
cards;
1 792 0
2 271 0
3 490 0
4 1095 0
5 1439 0
6 597 0
7 588 0
8 7078 0
9 612 0
10 555 0
run;
data want (drop=leading_value);
merge have
have (firstobs=3 keep=sales rename=(sales=leading_value));
smoothed_average=ifn(_n_>=3,mean(lag2(sales),lag(sales),sales,lag(leading_value),leading_value),.);
if leading_value=. then smoothed_average=.;
run;
This program assumes there are no missing values for sales, which means "if leading_value=. then smoothed_average=.;" statement will prevent unwanted averages at the end of the data set.
... View more