Dear Patrick, Thanks for your suggestion. I will read the suggestions you provide carefully and try to find someting useful for the problem. For the problem I raise I think probably I can add something to one rolling window program to get the result. The prorgam I use is as follows (I get from other people): Expand the data. data expanded(drop = nn); length span $ 13; set demo; do nn = 1 to &nqtrs; span = catx( '-' , put(intnx('quarter',date,nn-&nqtrs),yyq6.) , put(intnx('quarter',date,nn-1 ),yyq6.) ); output; end; run; I am wondering whether is any classical progress for this issue. So I post up the question. I am very grateful for the materials you provide. I will take good use of it. Best Wishes.
... View more