I think the reason are missing single-quotes and a $-sign expansion around your variable which are needed if the variable contained string-values. It should be look like:
if '$(vBuildQVD)' = 'True' then
Whereby in your above scenario you don't need these variables - you could directly use the first if with the QVDNoOfRecords to switch in your different branches.
Beside them it's quite often useful to create numeric or even better boolean variables instead of strings. In your case it could be for examples:
let vBuildQVD = ceil(QVDNoOfRecords('path/file.qvd') / 100000000000);
which returned 0 respectively FALSE if there is no record and 1 respectively TRUE if there is any record (whereby each number unless 0 will be in Qlik treated as TRUE).