I want to use dashboard variable in alert rule

Hello,

Similar question: Use Dashboard Variables in Alerts
TL;DR: Dashboard variables are not supported in Grafana Alerting.