367tabulating by day and hour
- Mar 20, 2003
> I now have a graph of 7 days but each day is only one little bar withOne problem is that you are using 'xscaletype: date' .. this is causing
> the total gets and posts for that day.
all bars within a date to overlap and appear to be just one bar.
Instead you should be using 'xscaletype: datetime' .. this will produce
one bar for each unique date+time in your data. proc processdata takes
care of summing all cases sharing the same date+time.
> I'd like to at least show the gets and post for each day by hour.To tabulate by hour, one method is to use a getdata filter to create a
data field that is truncated to a round hour value, then use that field
instead of the original datetime field.
One other issue-- you probably can't use auto scaling for Y because of the
summation that proc processdata is performing. Use a fixed Y range
The following should do what you seek........
#set ymax = 500000
#call $setdatefmt( "mm/dd/yy" )
#set xmax = $todaysdate()
#set xmin = $dateadd( @xmax, -7 )
fieldnames: datetime hits
select: $daysdiff(@@datetime,@xmin) >= 0
pf_fieldnames: datetime hits date_hr
##set DATE_HR = $substring(@@datetime,1,11)
@@1 @@2 @@DATE_HR:00:00
titledetails: align=L size=16 style=B color=darkblue
rectangle: 1 1 7.8 2.5
xrange: @xmin.00:00:00 @xmax.24:00:00
// yautorange datafield=hits nearest=100 margin=200 lowfix=0
yrange: 0 @ymax
// fields: datetime hits
fields: date_hr hits
fieldnames: date_hr hits
// locfield: datetime
- << Previous post in topic Next post in topic >>