Airflow monitoring in Grafana Dasboard using Prometheus

How to get dag status in grafana dashboard using promql. The dashboard should display the dag status by time.

Using metrics “count(last_over_time(airflow_dagrun_failed{kubernetes_namespace=”$namespace"}[1h])) by (dag_id)" to show failed dags and “count(last_over_time(airflow_dagrun_duration{kubernetes_namespace=”$namespace"}[1h])) by (dag_id)" to show success dags. The failed dags are showing in both failed and success tables. Is there any metrics to get correct results to show the dags status in failed and success tables by time.