I am using Newrelic with Prometheus counter metric. I am trying to create alert that will fire when average of the current week is less than the average of last week. The documentation has some information about baseline alerts, but it seems outdated and the described links are not in the UI. This looks like a very common scenario, so I wander if there is out of the box solution for it.
I tried so use anomaly detection feature - the metric data is not available for this feature.
I tried to create condition with NRQL "COMPARE WITH" - it is not supported in conditions.
As you have noticed, "COMPARE WITH" queries are not supported in NRQL Alerting, so you could write an API Synthetic to execute the NRQL against the GraphQL endpoint. You can then analyze the result and fail the Synthetic if it is outside of your threshold and fire an alert.
See a very good explanation about that in this New Relic topic.