could you provide sample data. it would be good to see how exactly the data is structured. you might be able to write an if statement. I'll have to look at the data to be certain.
The data looks like this:
Source Sales Amount
I'd like to be able to calculate PYVAR and BudgetVar.
This calculated field should do what you are looking for
ZN(IF [Source] = 'CY' THEN [Sales Amount] END) - ZN(IF [Source] = 'PY' THEN [Sales Amount] END)