title: Group by week in SAS
body: <p>I was writing a <code>proc tabulate</code> report, which would summarize data in a table by day and by week.</p>
  
  <p>So far this is what I have:</p>
  
  <pre><code>PROC TABULATE
  DATA=WORK.FB_REPORT
     ;
     VAR ORDERS UNITS PRICE SERVICE_CHARGE FRUIT_BOUQUET_REV REVENUE;
     CLASS SALES_TYPE /   ORDER=UNFORMATTED MISSING;
     CLASS ORDER_DATE /   ORDER=UNFORMATTED MISSING;
     TABLE 
            /* By Row*/
            ORDER_DATE *(  Sum={LABEL="Sum"}   )  
            all = 'Total'  *(  Sum={LABEL="Sum"}   )  , /*  CHANGE THIS LINE */
            /* By Column */
            SALES_TYPE *(ORDERS  UNITS  PRICE  SERVICE_CHARGE  MERHCREV  REVENUE REVENUE)
            all = 'Total'  *(MERCHREV  REVENUE REVENUE) ;
     ;
  
  RUN;
  </code></pre>
  
  <p>How can I change the <code>all = 'Total'*(Sum={LABEL="Sum"})</code> statement such that, to sum by grouping weeks in <code>ORDER_DATE</code>?</p>