How to get the relative changes from the Prometheus query

I have a query regarding the Prometheus. I am looking for a query/function in Prometheus that will give the relative change in the data. I have checked the Prometheus documentation but not able to find the suitable solution. I would like to create an alert based on the relative change not with the fixed value as for example if the messages for system A is less than 50 then send me an alert. This alert based on static value is not a good solution. Let me explain it better with the example here:

image

The drop of volume for system A is more concerning as it more drastic on a relative scale while both systems have same message volume around 10:00 hr. Therefore, I need to develop a Prometheus query to track the relative change of messages volume per interval. Any pointers will be really helpful. Thanks in advance.