means that
a disadvantage in one part of an undertaking may be balanced by an advantage elsewhere.
similar to
There is no great loss without some gain.
When any setback or negative aspect of a certain situation can be offset or balanced by equally advantageous or positive elements., the saying “What you lose on the swings you gain on the roundabouts” is appropriate.