And I want to find devices that existed in the past but not anymore

And I want to find documents that had existed in the past but not anymore. Let say daily buckets.
How I could visualize it?

deviceid:"123"

deviceid:"123" - count(100) for day 1
deviceid:"123" - count(0) for day 2 = not presented in day 2 bucket - this devices I want to list

I tried derivative or heatmap but it does not show what I expected.

Thank you