Filter alarm annotations based on variable

Is there a way to filter alarm annotations based on a dashboard variable? I only want to see an annotation sometimes, otherwise it looks like there is an alert on a chart when there shouldn’t be.