I wnat to find the sum of all cells in the column ' Units Sold ' for which I have 'Week 1',..........,'Week 4' in the column " Week ".This is since I wnat to find a breakdown of the number of Units sold over 4 week time period.
I used code -
proc tabulate data=WEEK f=dollar8.;
class week Laptopmodel;
It gave me the breakdown by weeks , but didnt give total of the units sold over each period. I need to find the sum of units sold over the 4 week period. I'm not sure if Conditional Sum is possible in SAS . Can I find the sum of the no. of units sold over the 4 week period individually.
A sample data is -
Transaction Timeof Laptop Units
Obs ID DateofSale Sale Model Sold Warranty Week
could you please suggest a change in the code below as i get one log error that The type of name (type) is unknown.
I used the code -
VALUE perfmt 1='period1'
VALUE LapModfmt 1='AP3965'
value usetype 1='AP3965'
/*Revenue breakdown for the two periods*/
proc tabulate data=period format=comma12.;
class period Week ;
var revenue ;
table period*(Week all='Subtotal')
all='Total for All Laptop Models'*f=dollar12.,
type='Laptop Models'*revenue=' '*sum=' '
all='Revenues from both Laptop Models'*revenue=' '*sum=' '
title 'revenues Each Laptop';
title2 '(Revenues in Dollars)';