Discussion Board for collaboration on QlikView Layout & Visualizations.
Please read Henric's blog post
to understand why the expression returns NULL when there are two Allocated Resource values possible.
(Try an aggregation function like sum([Allocated Resource]) )
You might also want to review your data model, I think proper linking your tables should remove your need for the if() statement, as far as I've understood your current model).