Get unique count of most recent event

If I understand what you're looking for correctly, I just responded to a user with something similar.

With the Time Series Visual Builder, you can use the Filter Ratio to create a visualization to show the percentage or count of online/offline devices.