Prometheus QL filter for a URL parameter not working

I am using Prometheus data source in Grafana connection. In dashboard, I need to query Prometheus with parameter in the URL (state).
Look at the following query:
URL : http://demo.do.prometheus.io:9090/graph?g0.expr=alertmanager_alerts{}&g0.tab=1&g0.display_mode=lines&g0.show_exemplars=0&g0.range_input=1h&state=unprocessed

notice (&state=unprocessed) at the end.
In Query: alertmanager_alerts{}
renders 3 rows:

alertmanager_alerts{env=“demo”, instance=“demo.do.prometheus.io:9093”, job=“alertmanager”, state=“active”} 6
alertmanager_alerts{env=“demo”, instance=“demo.do.prometheus.io:9093”, job=“alertmanager”, state=“suppressed”} 0
alertmanager_alerts{env=“demo”, instance=“demo.do.prometheus.io:9093”, job=“alertmanager”, state=“unprocessed”}

I need to filter rows and get just one row for state=“unprocessed”. My query is:
alertmanager_alerts{state=~‘$state’} ($state is in URL as a parameter)
It return NO rows. Please help me getting row for the above query.
Not sure what would be the correct query.
Thanks in advance

Which manual did you follow? Which value does your $state Grafana dashboard variable have?

state is a variable. Has been defined in Variable. Snapshot below:

state is being passed in URL in datalink.

Try choosing Inspect - Query of your panel so as to investigate the problem