How to alert on Prometheus series that returns limited values for the time range specifed?

We have a series that we’d like to alert on if it’s above 0 for 5m – however, this series doesn’t report 0 for every time bucket; so we might have a series that has:

-60m  |  -57m  |  -21m  |  -9m  |  -3m    <<< Relative Time
   1  ,  0    ,    1    ,  0    ,  1       <<< Data Returned

This will fire every time since the “last 5m” only has the value 1 from -3m. Is there a built-in way for Grafana alerts to deal with this sort of data?

I would like to know this too.
It seems to be a much needed functionality thats missing from grafana/prometheus.