proc format; value strfmt 2524='Smithfield' 2383='Tryon Road' 2020='Cary' 2218='Capitol Blvd' 2389='Pleasant Valley'; value $pntfmt 'a86w14'='Super Paint' 'a27w10'='Classic 99' 'a21w17'='Style Perfect'; picture galpic low-high='099.99 gals'; data invent; input store paint $ gallons price; format store strfmt. paint $pntfmt. gallons galpic.; label store='Raleigh Stores' paint='Interior Paint' gallons='Quantity'; cards; 2524 a86w14 24.5 18.49 2524 a27w10 24.75 15.49 2524 a21w17 16 12.49 2383 a86w14 36.5 18.49 2383 a27w10 32.25 15.49 2383 a21w17 24 12.49 2020 a86w14 36.5 18.49 2020 a27w10 40.25 15.49 2020 a21w17 32 12.49 2218 a86w14 30.5 18.49 2218 a27w10 32.25 15.49 2218 a21w17 36 12.49 2389 a86w14 40.5 18.49 2389 a27w10 40.25 15.49 2389 a21w17 28 12.49 ; run; ________________________________________________________________________ proc freq data=invent; tables store*paint; weight gallons; run; ________________________________________________________________________ proc tabulate data=invent; class store paint; var gallons; table store all='Total Gallons for District', (paint all='Total Gallons') *gallons*sum=' ' / rts=20; run; ________________________________________________________________________ data temp; set invent; dummy=1; label dummy='Quantity'; run; ________________________________________________________________________ proc tabulate data=temp; class store paint; var dummy price; weight gallons; tables store all='Total for District', (paint all='Total Quantity') *dummy*sum=' '*f=galpic. (paint all='Total Price')* price=' '*sum='Total Value'*f=dollar10.2 / rts=20; run;