I was writing a proc tabulate
report, which would summarize data in a table by day and by week.
So far this is what I have:
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;
How can I change the all = 'Total'*(Sum={LABEL="Sum"})
statement such that, to sum by grouping weeks in ORDER_DATE
?