They don't mean the same.
On the whole: has as one of its
meanings "typically," but "typically" isn't "average," even though
close. However, "on the whole" has other meanings which are predominant
(look in a dictionary), and as a result I would not use it here.
As a whole: simply wrong.