I used code to develop a table that essentially tallies the number the count of people in an area in a given hour. I would like the divide the Day of the Week number columns in the table by an arbitrary number. For example, I would like to divide each individual cell (12am to 11pm) in Day of the Week column 1 by 5 (so 140/5, 141/5, 122/5 etc.); for Day of the Week column 2, I would like do to the same to each hour cell but by 4 instead of 5. Is the possible? data ED_TAT2;
set ED_TAT1;
counttime = round(checkin_date_time,3600);
format counttime datetime18.;
do while (counttime le round(dispo_date_time,3600) );
hr = timepart(counttime);
day = weekday(datepart(counttime));
date = datepart(counttime);
output;
counttime= intnx('hour',counttime,1,'B');
end;
run;
proc tabulate data=ED_TAT2;
class hr day;
format hr timeampm5. ;
table hr='', day*n='' / box=hr;
label hr='Hour'
day= 'Day of week';
run;
... View more