How to show only those records where difference between field values is greater than x

Hello , I am monitoring 1000 devices for “restarts” .Whenever a device restarts ,it will increment the value “restart count” by 1 . How can I show in graph only those devices for which difference of this value(restart count) is >=1 between two selected time points.
Currently I am using difference() function to identify the spike easily but since most devices have difference in order of 1 or around this value ,they all get overlapped and it is hard to figure out quickly for what all devices this happened. Thanks in advance

please provide some sample data and the flux query you are using and graf details?

|> range(start: “start time”, stop: “stop time”)
|> filter(fn: (r) => r[“_measurement”] == “measurementname”)
|> filter(fn: (r) => r[“_field”] == “restart” )
|> difference()

this gives me spike but since there are lots of devices having difference near 1 , the points get overlapped in graph
I am using Graph(old) to visualize data and grafana version v8.2.6

unfortunately I cant paste organization data here due to policy

Not organization data but sample data. schema is seldom top secret but data is so post obfuscated sample data

ok like the table has only two fields “restart” and “crash” being sent from devices time to time under a single measurement “measurement1”