Alert rule basing on one metric with different labels

I have one metric with two labels. One is account, another is type. The number of accounts may vary. type might be typeA or typeB.

I need to create an rule that will fire an alert for every account:

my_metric(type="typeA") > 0 AND my_metric(type="typeB") == 0

How can I do this?