Show active devices within a specific period

Can we get a way to show active devices within a specific period (let’s say last 8 or 24 hours) in saved searches? It would also be great to have the dashboard have the TOTAL DEVICES, TOTAL ACTIVE/ONLINE, TOTAL OFFLINE with clickable drill down.