Configure Alerts by combining two queries

Hi,

I am trying to set alerts if the difference of two queries is above 100. The alert condition should be something like below.

diff() OF query(A, B, now) IS ABOVE 100

I know this won’t work since the 2nd and 3rd parameters are defined as time range by default. Can someone please suggest me any other possible way to meet above condition.

Can someone help me with this?