BlackBox Exporter Calculate Percentage Status Codes

I’m trying to calculate the percentage of 200 & 500 status codes.
I have tried a few things including:

avg(probe_status_code{instance="$target"} != 200) / (probe_status_code{instance="$target"} == 200) * 100

When I do this I get no data and when I try avg_over_time I get the error instant vector given for range.

Has anyone been able to do this yet? Do I need to do two queries then transform in Grafana?


Bump please someone if you know how to do this?