So if you want like "Yesterdays Sales" I would create a cron job, that looks at the sales (orders) table, for all sales and sums up the total.
You could store this in a new table,
order_statistics or something like that, and then you can just grab a stored value. The idea being that once the clock passes into the new day...no more sales will happen on yesterday's date. And this way you are not dealing with calculating that data on the fly each page request.
Then I would probably look at cacheing that view file, for 12 hours or something, so that you really aren't even hitting the db every time, because again, that
order_statistics table should not change except when the cron job adds a new row.
This would also provide you historical data that you could put in a graph, and then maybe you could have "current day sales" that you calculate on the fly, maybe once an hour. This gives you (or your client) a sort of "live" look at the sales coming in and can easily compare to last 30 days....but would not create a lot of load on the server.
Then later you could get really fancy and use websockets to update the dashboard live anytime a sale came in. But I tend to think every hour or half hour of updating when the page loads is probably acceptable in most situations.