having a very hard time 'seeing' you actual data.
your passing some summary data back to the main report via shared variables and I don't know where any of these sub reports are running, where the shared variables are in the main report, what the calculations are doing in the main report and where they are at and then then where you are running these variance/variance prior formula.
In general when a formula 'skips' if-then conditions it is becuase it has either hit a NULL value and just stopped altogether or the first condition set was met and it stopped fofr that reason.