There are two ways to do what you want. By far the most efficient is to set 06/07 Variance to be a parent of 06 Actuals and 07 Actuals, and make the consolidation a subtraction by changing the weight of 06 Actuals to -1.
For more complex calculations, you write rules. These are attached to cubes (right click and select 'Create Rule'). The rules language is very powerful but (probably therefore) easy to mistreat. Generally I don't like recommending to posters to take a course as it can seem a bit of a brushoff but in this case it probably makes sense. The more recent versions of TM1 have a rules guide in PDF form which would get you started.