I cannot claim any expertise with this, but I noticed the doc for the doESP= parm says "when set to True, the action can take advantage of partitioning and ordering on the input table. You must specify the groupBy parameter for the input table. The ID variable must be specified as the last groupBy parameter and in the orderBy parameter."
So I think your table just needs to be partitioned prior to the aggregation. This worked for me:
data casuser.PRICEDATA;
set SASHELP.PRICEDATA;
run;
proc cas;
table.partition / casout={caslib="CASUSER",name="PRICEDATA", replace=true},
table={name="PRICEDATA",caslib="casuser",
groupby={{name="regionname"}}
orderby={{name="date"}}
};
run;
aggregation.aggregate /
table={name="PRICEDATA",caslib="casuser",
where="1=1",
groupby={ {name="regionname"}, {name="date" , format="yyq6."}}
}
varspecs={
{subset="sum", name="sale", columnnames="sum_sale"}
}
casout={name="nodup2", caslib='casuser', replace=TRUE}
savegroupbyraw=TRUE, savegroupbyformat=false, raw=TRUE,
windowInt="quarter",
contribute="productname",
keepRecord=TRUE,
doESP=TRUE,
interval="quarter",
jumpingWindow=false,
id="date" ;
table.fetch / table={name="nodup2", caslib="casuser"};
run;
quit;
... View more