The thing to bear in mind with Tableau's calculations is that they have to make sense on a row level before they're taken forward to summarised levels.
If you use an if to see if a metric is 1 and 2, it won't make sense on a row level because it can never be 1 and 2 on any row. So on your row level, the IF always comes out at the ELSE bit.
From your if statement though, it looks like you're trying to do an average?
Why not use average in your calculation? Average on one metric is the value of that metric and otherwise it is averaged.
Hope that helps.