Is it possible to run a calculated field of amounts within the same field, but they have different category names?

I.e.
Field 1 = Rate
Field 2 = Basis

Data
Basis = "CAN", "US"
Rate = "10", "20"

How can I have a calculated field that would be capable of distinguishing:
1. Rate (CAN) - Rate(US)
= 10 - 20 = -10 (-10 is the calculated field)


Thank you