What about the streamstats command to use it like this:
| bucket _time span=1d
| stats count as TotalMessages by _time, site
| sort 1-_time
| eval weekday=strftime(_time,"%a")
| eval today=strftime(now(), "%a")
| eval sameDay=if(today=weekday,1,0)
| search sameDay=1
| streamstats avg(TotalMessages) AS avg BY site
| streamstats current=f global=f window=1 latest(avg) as last_avg by site
| stats latest(TotalMessages) as TotalMessages, latest(last_avg) AS last_avg BY site
| eval trend=TotalMessages-last_avg
... View more