Good afternoon. So I am creating a grafana dashboard and I am having a problem with counting a unique number in a list until the number changes. I am counting the number of times a service is unavailable, when the ping rate is 100% loss. The check happens 48 times in one day. So I have a query that shows the timestamp and the ping loss number. What I want to do is to count the number of 100's until the result is any other number. I want the result to be from now back to the first non-100. I am using influx as the data source.
Example data
Date result
1/1/2023 02:01 100
1/1/2023 01:31 100
1/1/2023 01:01 100
1/1/2023 12:31 88
1/1/2023 12:01 24
In the above data set the result would be 3. The counting would stop at the 88. Like I said I have the query setup already to pull the data into grafana now I just need a hand on the rest. Thank you for your help.
I have been at it for a while, I have tried a bunch of different things from this site and others. Really open to any suggestions.